-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Closed
Description
I am experiencing a strange behavior using expect.not, which may be a bug.
not seems not to defined on the expect object anymore.
I pasted a simple example from https://facebook.github.io/jest/docs/en/expect.html#expectnotstringcontainingstring
into a repl.it demo: https://repl.it/@holgergp/testing-not
The output of the test:
Jest v22.1.2 node v7.4.0 linux/amd64
FAIL ./not-test.js
not.stringContaining
✕ matches if the actual string does not contain the expected substring (7ms)
● not.stringContaining › matches if the actual string does not contain the expected substring
TypeError: Cannot read property 'stringContaining' of undefined
3 |
4 | it('matches if the actual string does not contain the expected substring', () => {
> 5 | expect('How are you?').toEqual(expect.not.stringContaining(expected));
6 | });
7 | });
at Object.it (not-test.js:5:46)
Test Suites: 1 failed, 1 total
Tests: 1 failed, 1 total
Snapshots: 0 total
Time: 0.913s
Ran all test suites.
exit status 1
rafaelkendrik, MaxDonchenko, smiller171, ctsstc, nandastone and 3 more