Issue when using expect.not
See original GitHub issueI 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
Issue Analytics
- State:
- Created 6 years ago
- Reactions:8
- Comments:12 (3 by maintainers)
Top Results From Across the Web
linux - Expect - does not send text as desired - Stack Overflow
the cursor is located below the text and in the line below. I am not sure if this has to do anything with...
Read more >Expect script is not working on linux machine
Same thing I am trying through expect script and it throws me error as below. ./expectscriptssh.sh 192.168.1.177 spawn ssh root@192.168.1.177 ...
Read more >1. Intro—What Is Expect? - Exploring Expect [Book] - O'Reilly
A more serious problem occurs when dealing with programs that change the way they buffer output depending on whether they are running interactively...
Read more >expect(1) - Linux man page
Expect is a program that "talks" to other interactive programs according to a script. Following the script, Expect knows what can be expected...
Read more >Failed attempt to expect and send in an expect script in MinGW
You don't have expect installed on your system. If the error is this: bash: expect: command not found. To confirm, try using which...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@SimenB I’m working on a PR to fix this now
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.