I made a script to change all the expect calls in all the tests to expect().not and vice versa to see if there were any tests that passed on both. This could potentially mean that we are not correctly testing the desired outcomes. Only one was tripped:
test/hooks/useMessageList.test.jsx :: describe('useMessageList :: it('Returns inbox list if list is found, but an empty list when 0 messages'
Reproduction Steps:
Duplicate the lines with expect calls.
In the duplicated line, flip the not (add .not where it does not exist on the expect calls, and remove .not where it does exist).
Bug Description:
I made a script to change all the
expect
calls in all the tests toexpect().not
and vice versa to see if there were any tests that passed on both. This could potentially mean that we are not correctly testing the desired outcomes. Only one was tripped:test/hooks/useMessageList.test.jsx
:: describe('useMessageList :: it('Returns inbox list if list is found, but an empty list when 0 messages'Reproduction Steps:
expect
calls.not
(add.not
where it does not exist on theexpect
calls, and remove.not
where it does exist).