Skip to content

Commit

Permalink
Merge pull request #254 from I3uckwheat/hotfix/fix-remove-submitted-c…
Browse files Browse the repository at this point in the history
…ards-text

Fix removeSubmittedCards tests to fail when expected
  • Loading branch information
wise-king-sullyman authored Apr 24, 2021
2 parents f444fc8 + 74de567 commit 3c31697
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions frontend/src/contexts/HostContext/HostReducer.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -883,13 +883,13 @@ describe('reducer', () => {
const state = {
players: {
bar: {
submittedCards: [],
cards: [{ text: 'test' }, { text: 'test' }, { text: 'test' }],
submittedCards: [0],
cards: [{ text: 'test1' }, { text: 'test2' }, { text: 'test3' }],
},

baz: {
submittedCards: [0],
cards: [{ text: 'test1' }, { text: 'test2' }, { text: 'test3' }],
submittedCards: [1],
cards: [{ text: 'test4' }, { text: 'test5' }, { text: 'test6' }],
},
},

Expand All @@ -901,7 +901,15 @@ describe('reducer', () => {
payload: {},
});

expect(result.players.baz.cards).not.toContain({ text: 'test1' });
expect(result.players.bar.cards).toEqual([
{ text: 'test2' },
{ text: 'test3' },
]);

expect(result.players.baz.cards).toEqual([
{ text: 'test4' },
{ text: 'test6' },
]);
});
});

Expand Down

0 comments on commit 3c31697

Please sign in to comment.