Skip to content

Commit dbfe7fc

Browse files
committed
presence model tests: Remove one that expects fallback we don't need
We removed the explicit fallback code this was testing in b945442. As it turns out, the way we use Immutable.Map (new in that commit's same PR) effectively handles the ancient-server behavior as well as the explicit fallback was, and so this test still passes. But that's incidental and not something we need to guarantee.
1 parent 4a22417 commit dbfe7fc

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

src/presence/__tests__/presenceModel-test.js

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -224,28 +224,6 @@ describe('presenceReducer', () => {
224224
const expectedState = makePresenceState([[user, userPresence]]);
225225
expect(presenceReducer(prevState, action)).toEqual(expectedState);
226226
});
227-
228-
// TODO(#5102): Delete; see comment on implementation.
229-
test('when no `presence` data is given reset state', () => {
230-
const user = eg.otherUser;
231-
const userPresence = {
232-
aggregated: { client: 'website', status: 'active', timestamp: 123 },
233-
website: { client: 'website', status: 'active', timestamp: 123 },
234-
};
235-
const prevState = makePresenceState([[user, userPresence]]);
236-
const action = eg.mkActionRegisterComplete({
237-
// Hmm, we should need a Flow suppression here. This property is
238-
// marked required in InitialData, and this explicit undefined is
239-
// meant to defy that; see TODO(#5102) above.
240-
// mkActionRegisterComplete is designed to accept input with this or
241-
// any property *omitted*… and I think, as a side effect of handling
242-
// that, Flow mistakenly accepts an explicit undefined here, so it
243-
// doesn't catch the resulting malformed InitialData.
244-
presences: undefined,
245-
});
246-
const expectedState = makePresenceState([]);
247-
expect(presenceReducer(prevState, action)).toEqual(expectedState);
248-
});
249227
});
250228

251229
describe('PRESENCE_RESPONSE', () => {

0 commit comments

Comments
 (0)