-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Labels
Description
Jest v20.0.4
Node v8.0.0
$ cat test.js
test('foo', () => {
console.log('this is the expected log statement');
expect().toBeDefined();
});
$ jest test.js
FAIL ./test.js
● foo
expect(received).toBeDefined()
Expected value to be defined, instead received
undefined
at Object.<anonymous>.test (test.js:3:12)
at Promise (<anonymous>)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:169:7)
✕ foo (5ms)
Test Suites: 1 failed, 1 total
Tests: 1 failed, 1 total
Snapshots: 0 total
Time: 0.808s, estimated 1s
Ran all test suites matching "test.js".
console.log test.js:2
this is the expected log statement
$ jest -b test.js
FAIL ./test.js
● foo
expect(received).toBeDefined()
Expected value to be defined, instead received
undefined
at Object.<anonymous>.test (test.js:3:12)
at Promise (<anonymous>)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:169:7)
✕ foo (5ms)
Test Suites: 1 failed, 1 total
Tests: 1 failed, 1 total
Snapshots: 0 total
Time: 0.55s, estimated 1s
Ran all test suites matching "test.js".
$