Update tests to make more reliable

- hope you are ok with this @roschaefer, it was failing locally and I guess it passed the build because half the time the array is returned in the order expected while half the time not.
This commit is contained in:
Matt Rider 2019-07-15 07:33:22 -03:00
parent 268ec332b4
commit 8f17045cdb

View File

@ -106,10 +106,11 @@ describe('rewards', () => {
id: 'indiegogo_en_racoon',
icon: '/img/badges/indiegogo_en_racoon.svg',
})
const badges = [{ id: 'indiegogo_en_racoon' }, { id: 'indiegogo_en_rhino' }]
const expected = {
reward: {
id: 'u1',
badges: [{ id: 'indiegogo_en_racoon' }, { id: 'indiegogo_en_rhino' }],
badges: expect.arrayContaining(badges),
},
}
await client.request(mutation, variables)