Skip to content

Commit e7f21cf

Browse files
author
Christoph Pader
committed
fix: test
1 parent 7112ff7 commit e7f21cf

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

tests/unit/onyxTest.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -927,8 +927,15 @@ describe('Onyx', () => {
927927
expect(collectionCallback).toHaveBeenCalledTimes(2);
928928
expect(collectionCallback).toHaveBeenNthCalledWith(1, null, undefined);
929929
expect(collectionCallback).toHaveBeenNthCalledWith(2, {[itemKey]: {a: 'a'}});
930-
expect(testCallback).toHaveBeenNthCalledWith(1, 'taco', ONYX_KEYS.TEST_KEY);
931-
expect(otherTestCallback).toHaveBeenNthCalledWith(1, 'pizza', ONYX_KEYS.OTHER_TEST);
930+
931+
expect(testCallback).toHaveBeenCalledTimes(2);
932+
expect(testCallback).toHaveBeenNthCalledWith(1, null, undefined);
933+
expect(testCallback).toHaveBeenNthCalledWith(2, 'taco', ONYX_KEYS.TEST_KEY);
934+
935+
expect(otherTestCallback).toHaveBeenCalledTimes(2);
936+
// We set an initial value of 42 for ONYX_KEYS.OTHER_TEST in Onyx.init()
937+
expect(otherTestCallback).toHaveBeenNthCalledWith(1, 42, ONYX_KEYS.OTHER_TEST);
938+
expect(otherTestCallback).toHaveBeenNthCalledWith(2, 'pizza', ONYX_KEYS.OTHER_TEST);
932939
Onyx.disconnect(connectionIDs);
933940
}),
934941
);

0 commit comments

Comments
 (0)