$ git branch * master standardize-filenames-in-packages/jest-circus $ yarn test yarn run v1.10.1 $ yarn typecheck && yarn lint && yarn jest $ flow check --include-warnings Found 0 errors $ eslint . --cache --ext js,md $ node ./packages/jest-cli/bin/jest.js PASS packages/jest-mock/src/__tests__/jest_mock.test.js (9.465s) PASS packages/jest-haste-map/src/__tests__/index.test.js (11.513s) PASS packages/jest-config/src/__tests__/normalize.test.js (11.802s) PASS packages/pretty-format/src/__tests__/immutable.test.js PASS packages/jest-util/src/__tests__/fakeTimers.test.js PASS packages/expect/src/__tests__/matchers.test.js (7.153s) PASS packages/diff-sequences/src/__tests__/index.test.js PASS packages/pretty-format/src/__tests__/pretty_format.test.js PASS packages/expect/src/__tests__/spy_matchers.test.js PASS packages/jest-diff/src/__tests__/diff.test.js PASS packages/pretty-format/src/__tests__/react.test.js ● Console console.error packages/pretty-format/node_modules/react/cjs/react.development.js:241 Warning: forwardRef render functions accept exactly two parameters: props and ref. Did you forget to use the ref parameter? PASS packages/jest-cli/src/__tests__/watch.test.js (7.965s) PASS packages/jest-haste-map/src/crawlers/__tests__/watchman.test.js PASS packages/jest-cli/src/__tests__/SearchSource.test.js (5.106s) PASS packages/jest-each/src/__tests__/template.test.js PASS packages/jest-runtime/src/__tests__/script_transformer.test.js (8.971s) PASS packages/jest-each/src/__tests__/array.test.js PASS packages/jest-docblock/src/__tests__/index.test.js PASS packages/pretty-format/src/__tests__/dom_element.test.js PASS packages/jest-cli/src/__tests__/SnapshotInteractiveMode.test.js PASS packages/jest-cli/src/reporters/__tests__/verbose_reporter.test.js PASS packages/jest-worker/src/__tests__/index.test.js PASS packages/jest-cli/src/reporters/__tests__/coverage_reporter.test.js PASS e2e/__tests__/jest_changed_files.test.js (39.92s) PASS packages/jest-runtime/src/__tests__/runtime_require_module.test.js (8.655s) PASS e2e/__tests__/multi_project_runner.test.js (68.285s) PASS packages/jest-worker/src/__tests__/worker.test.js PASS e2e/__tests__/snapshot.test.js (65.176s) PASS packages/jest-worker/src/__tests__/child.test.js PASS packages/expect/src/__tests__/asymmetric_matchers.test.js PASS packages/jest-resolve/src/__tests__/resolve.test.js FAIL e2e/__tests__/to_match_inline_snapshot.test.js (38.069s) ● basic support expect(received).toMatch(expected) Expected value to match: "1 snapshot written from 1 test suite." Received: "FAIL __tests__/basic-support.test.js ● Test suite failed to run Jest: Couldn't locate all inline snapshots. 198 | 199 | if (remainingSnapshots.size) { > 200 | throw new Error(`Jest: Couldn't locate all inline snapshots.`); | ^ 201 | } 202 | 203 | return ast; at Object.parse (../../packages/jest-snapshot/build/inline_snapshots.js:200:11) Test Suites: 1 failed, 1 total Tests: 0 total Snapshots: 0 total Time: 3.1s Ran all test suites matching /basic-support.test.js/i. " 34 | const {stderr, status} = runJest(DIR, ['-w=1', '--ci=false', filename]); 35 | const fileAfter = readFile(filename); > 36 | expect(stderr).toMatch('1 snapshot written from 1 test suite.'); | ^ 37 | expect(status).toBe(0); 38 | expect(fileAfter).toMatchSnapshot('initial write'); 39 | } at Object.toMatch (e2e/__tests__/to_match_inline_snapshot.test.js:36:20) ● handles property matchers expect(received).toMatch(expected) Expected value to match: "1 snapshot written from 1 test suite." Received: "FAIL __tests__/handle-property-matchers.test.js ● Test suite failed to run Jest: Couldn't locate all inline snapshots. 198 | 199 | if (remainingSnapshots.size) { > 200 | throw new Error(`Jest: Couldn't locate all inline snapshots.`); | ^ 201 | } 202 | 203 | return ast; at Object.parse (../../packages/jest-snapshot/build/inline_snapshots.js:200:11) Test Suites: 1 failed, 1 total Tests: 0 total Snapshots: 0 total Time: 3.835s Ran all test suites matching /handle-property-matchers.test.js/i. " 84 | const {stderr, status} = runJest(DIR, ['-w=1', '--ci=false', filename]); 85 | const fileAfter = readFile(filename); > 86 | expect(stderr).toMatch('1 snapshot written from 1 test suite.'); | ^ 87 | expect(status).toBe(0); 88 | expect(fileAfter).toMatchSnapshot('initial write'); 89 | } at Object.toMatch (e2e/__tests__/to_match_inline_snapshot.test.js:86:20) ● removes obsolete external snapshots expect(received).toMatch(expected) Expected value to match: "Snapshots: 1 obsolete, 1 written, 1 total" Received: "FAIL __tests__/removes-obsolete-external-snapshots.test.js ● Test suite failed to run Jest: Couldn't locate all inline snapshots. 198 | 199 | if (remainingSnapshots.size) { > 200 | throw new Error(`Jest: Couldn't locate all inline snapshots.`); | ^ 201 | } 202 | 203 | return ast; at Object.parse (../../packages/jest-snapshot/build/inline_snapshots.js:200:11) Test Suites: 1 failed, 1 total Tests: 0 total Snapshots: 0 total Time: 3.32s Ran all test suites matching /removes-obsolete-external-snapshots.test.js/i. " 155 | const {stderr, status} = runJest(DIR, ['-w=1', '--ci=false', filename]); 156 | const fileAfter = readFile(filename); > 157 | expect(stderr).toMatch('Snapshots: 1 obsolete, 1 written, 1 total'); | ^ 158 | expect(status).toBe(1); 159 | expect(fileAfter).toMatchSnapshot('inline snapshot written'); 160 | expect(fs.existsSync(snapshotPath)).toEqual(true); at Object.toMatch (e2e/__tests__/to_match_inline_snapshot.test.js:157:20) ● supports async matchers expect(received).toMatch(expected) Expected value to match: "2 snapshots written from 1 test suite." Received: "FAIL __tests__/async-matchers.test.js ● Test suite failed to run Jest: Couldn't locate all inline snapshots. 198 | 199 | if (remainingSnapshots.size) { > 200 | throw new Error(`Jest: Couldn't locate all inline snapshots.`); | ^ 201 | } 202 | 203 | return ast; at Object.parse (../../packages/jest-snapshot/build/inline_snapshots.js:200:11) Test Suites: 1 failed, 1 total Tests: 0 total Snapshots: 0 total Time: 3.501s Ran all test suites matching /async-matchers.test.js/i. " 188 | const {stderr, status} = runJest(DIR, ['-w=1', '--ci=false', filename]); 189 | const fileAfter = readFile(filename); > 190 | expect(stderr).toMatch('2 snapshots written from 1 test suite.'); | ^ 191 | expect(status).toBe(0); 192 | expect(fileAfter).toMatchSnapshot(); 193 | }); at Object.toMatch (e2e/__tests__/to_match_inline_snapshot.test.js:190:18) ● supports async tests expect(received).toMatch(expected) Expected value to match: "1 snapshot written from 1 test suite." Received: "FAIL __tests__/async.test.js ● Test suite failed to run Jest: Couldn't locate all inline snapshots. 198 | 199 | if (remainingSnapshots.size) { > 200 | throw new Error(`Jest: Couldn't locate all inline snapshots.`); | ^ 201 | } 202 | 203 | return ast; at Object.parse (../../packages/jest-snapshot/build/inline_snapshots.js:200:11) Test Suites: 1 failed, 1 total Tests: 0 total Snapshots: 0 total Time: 3.945s Ran all test suites matching /async.test.js/i. " 205 | const {stderr, status} = runJest(DIR, ['-w=1', '--ci=false', filename]); 206 | const fileAfter = readFile(filename); > 207 | expect(stderr).toMatch('1 snapshot written from 1 test suite.'); | ^ 208 | expect(status).toBe(0); 209 | expect(fileAfter).toMatchSnapshot(); 210 | }); at Object.toMatch (e2e/__tests__/to_match_inline_snapshot.test.js:207:18) ● writes snapshots with non-literals in expect(...) expect(received).toMatch(expected) Expected value to match: "1 snapshot written from 1 test suite." Received: "FAIL __tests__/async.test.js ● Test suite failed to run Jest: Couldn't locate all inline snapshots. 198 | 199 | if (remainingSnapshots.size) { > 200 | throw new Error(`Jest: Couldn't locate all inline snapshots.`); | ^ 201 | } 202 | 203 | return ast; at Object.parse (../../packages/jest-snapshot/build/inline_snapshots.js:200:11) Test Suites: 1 failed, 1 total Tests: 0 total Snapshots: 0 total Time: 3.078s Ran all test suites matching /async.test.js/i. " 222 | 223 | const fileAfter = readFile(filename); > 224 | expect(stderr).toMatch('1 snapshot written from 1 test suite.'); | ^ 225 | expect(status).toBe(0); 226 | expect(fileAfter).toMatchSnapshot(); 227 | }); at Object.toMatch (e2e/__tests__/to_match_inline_snapshot.test.js:224:18) ● handles mocking native modules prettier relies on expect(received).toMatch(expected) Expected value to match: "1 snapshot written from 1 test suite." Received: "FAIL __tests__/mockFail.test.js ● Test suite failed to run Jest: Couldn't locate all inline snapshots. 198 | 199 | if (remainingSnapshots.size) { > 200 | throw new Error(`Jest: Couldn't locate all inline snapshots.`); | ^ 201 | } 202 | 203 | return ast; at Object.parse (../../packages/jest-snapshot/build/inline_snapshots.js:200:11) Test Suites: 1 failed, 1 total Tests: 0 total Snapshots: 0 total Time: 3.057s Ran all test suites matching /mockFail.test.js/i. " 240 | writeFiles(TESTS_DIR, {[filename]: test}); 241 | const {stderr, status} = runJest(DIR, ['-w=1', '--ci=false', filename]); > 242 | expect(stderr).toMatch('1 snapshot written from 1 test suite.'); | ^ 243 | expect(status).toBe(0); 244 | }); 245 | at Object.toMatch (e2e/__tests__/to_match_inline_snapshot.test.js:242:18) › 10 snapshots obsolete. • basic support: initial write 1 • basic support: snapshot mismatch 1 • basic support: snapshot passed 1 • basic support: snapshot updated 1 • handles property matchers: initial write 1 • handles property matchers: snapshot failed 1 • handles property matchers: snapshot passed 1 • handles property matchers: snapshot updated 1 • removes obsolete external snapshots: external snapshot cleaned 1 • removes obsolete external snapshots: inline snapshot written 1 PASS packages/pretty-format/src/__tests__/asymmetric_matcher.test.js PASS packages/expect/src/__tests__/to_throw_matchers.test.js PASS packages/jest-cli/src/lib/__tests__/init.test.js PASS packages/jest-snapshot/src/__tests__/utils.test.js PASS packages/jest-cli/src/__tests__/test_sequencer.test.js PASS packages/jest-validate/src/__tests__/validate.test.js PASS packages/jest-runtime/src/__tests__/runtime_require_mock.test.js PASS packages/jest-util/src/__tests__/deepCyclicCopy.test.js PASS packages/jest-haste-map/src/crawlers/__tests__/node.test.js PASS e2e/__tests__/to_match_snapshot.test.js (86.215s) PASS packages/jest-runtime/src/__tests__/runtime_require_module_or_mock.test.js PASS packages/jest-runtime/src/__tests__/should_instrument.test.js FAIL e2e/__tests__/globals.test.js (36.35s) ● cannot have describe with no implementation expect(value).toMatchSnapshot() Received value does not match stored snapshot "cannot have describe with no implementation 1". - Snapshot + Received "FAIL __tests__/only-constructs.test.js ● Test suite failed to run Missing second argument. It must be a callback function. - 1 | - > 2 | describe('describe, no implementation'); - | ^ - 3 | + 301 | const suite = suiteFactory(description); + 302 | if (specDefinitions === undefined) { + > 303 | throw new Error( + | ^ + 304 | `Missing second argument. It must be a callback function.` + 305 | ); + 306 | } at __tests__/only-constructs.test.js:2:5 " 129 | const rest = cleanStderr(stderr); 130 | const {summary} = extractSummary(stderr); > 131 | expect(rest).toMatchSnapshot(); | ^ 132 | expect(summary).toMatchSnapshot(); 133 | }); 134 | at Object.toMatchSnapshot (e2e/__tests__/globals.test.js:131:16) ● cannot test with no implementation expect(value).toMatchSnapshot() Received value does not match stored snapshot "cannot test with no implementation 1". - Snapshot + Received "FAIL __tests__/only-constructs.test.js ● Test suite failed to run Missing second argument. It must be a callback function. Perhaps you want to use `test.todo` for a test placeholder. - 1 | - 2 | it('it', () => {}); - > 3 | it('it, no implementation'); - | ^ - 4 | test('test, no implementation'); - 5 | + 442 | } + 443 | if (fn === undefined) { + > 444 | throw new Error( + | ^ + 445 | 'Missing second argument. It must be a callback function. Perhaps you want to use `test.todo` for a test placeholder.' + 446 | ); + 447 | } at __tests__/only-constructs.test.js:3:5 " 146 | 147 | const {summary} = extractSummary(stderr); > 148 | expect(cleanStderr(stderr)).toMatchSnapshot(); | ^ 149 | expect(summary).toMatchSnapshot(); 150 | }); 151 | at Object.toMatchSnapshot (e2e/__tests__/globals.test.js:148:31) ● cannot test with no implementation with expand arg expect(value).toMatchSnapshot() Received value does not match stored snapshot "cannot test with no implementation with expand arg 1". - Snapshot + Received "FAIL __tests__/only-constructs.test.js ● Test suite failed to run Missing second argument. It must be a callback function. Perhaps you want to use `test.todo` for a test placeholder. - 1 | - 2 | it('it', () => {}); - > 3 | it('it, no implementation'); - | ^ - 4 | test('test, no implementation'); - 5 | + 442 | } + 443 | if (fn === undefined) { + > 444 | throw new Error( + | ^ + 445 | 'Missing second argument. It must be a callback function. Perhaps you want to use `test.todo` for a test placeholder.' + 446 | ); + 447 | } at __tests__/only-constructs.test.js:3:5 " 224 | 225 | const {summary} = extractSummary(stderr); > 226 | expect(cleanStderr(stderr)).toMatchSnapshot(); | ^ 227 | expect(summary).toMatchSnapshot(); 228 | }); 229 | at Object.toMatchSnapshot (e2e/__tests__/globals.test.js:226:31) › 3 snapshots failed. PASS packages/jest-cli/src/__tests__/notify_reporter.test.js PASS e2e/__tests__/only_changed.test.js (100.111s) PASS packages/jest-snapshot/src/__tests__/inline_snapshots.test.js PASS packages/jest-runtime/src/__tests__/runtime_require_module_or_mock_transitive_deps.test.js (5.351s) PASS packages/jest-haste-map/src/__tests__/worker.test.js PASS e2e/__tests__/coverage_threshold.test.js (40.443s) FAIL e2e/__tests__/failures.test.js (42.994s) ● not throwing Error objects expect(value).toMatchSnapshot() Received value does not match stored snapshot "not throwing Error objects 5". - Snapshot + Received @@ -10,45 +10,45 @@ ● Promise thrown during test thrown: Promise {} - 7 | }; - 8 | - > 9 | test('Promise thrown during test', () => { - | ^ - 10 | throw Promise.resolve(5); - 11 | }); - 12 | + 83 | this.throwOnExpectationFailure = !!attrs.throwOnExpectationFailure; + 84 | + > 85 | this.initError = new Error(); + | ^ + 86 | this.initError.name = ''; + 87 | + 88 | // Without this line v8 stores references to all closures at __tests__/during_tests.test.js:9:1 ● Boolean thrown during test thrown: false - 11 | }); - 12 | - > 13 | test('Boolean thrown during test', () => { - | ^ - 14 | // eslint-disable-next-line no-throw-literal - 15 | throw false; - 16 | }); + 83 | this.throwOnExpectationFailure = !!attrs.throwOnExpectationFailure; + 84 | + > 85 | this.initError = new Error(); + | ^ + 86 | this.initError.name = ''; + 87 | + 88 | // Without this line v8 stores references to all closures at __tests__/during_tests.test.js:13:1 ● undefined thrown during test thrown: undefined - 16 | }); - 17 | - > 18 | test('undefined thrown during test', () => { - | ^ - 19 | // eslint-disable-next-line no-throw-literal - 20 | throw undefined; - 21 | }); + 83 | this.throwOnExpectationFailure = !!attrs.throwOnExpectationFailure; + 84 | + > 85 | this.initError = new Error(); + | ^ + 86 | this.initError.name = ''; + 87 | + 88 | // Without this line v8 stores references to all closures at __tests__/during_tests.test.js:18:1 ● Object thrown during test @@ -59,17 +59,17 @@ "tooDeep": [Object], }, ], } - 21 | }); - 22 | - > 23 | test('Object thrown during test', () => { - | ^ - 24 | // eslint-disable-next-line no-throw-literal - 25 | throw deepObject; - 26 | }); + 83 | this.throwOnExpectationFailure = !!attrs.throwOnExpectationFailure; + 84 | + > 85 | this.initError = new Error(); + | ^ + 86 | this.initError.name = ''; + 87 | + 88 | // Without this line v8 stores references to all closures at __tests__/during_tests.test.js:23:1 ● Error during test @@ -108,17 +108,17 @@ "tooDeep": [Object], }, ], } - 36 | - 37 | test('done(non-error)', done => { - > 38 | done(deepObject); - | ^ - 39 | }); - 40 | - 41 | test('returned promise rejection', () => Promise.reject(deepObject)); + 576 | actual: '', + 577 | message: message, + > 578 | error: checkIsError ? error : new Error(message) + | ^ + 579 | }); + 580 | }; + 581 | } at __tests__/during_tests.test.js:38:3 ● returned promise rejection @@ -129,14 +129,16 @@ "tooDeep": [Object], }, ], } - 39 | }); - 40 | - > 41 | test('returned promise rejection', () => Promise.reject(deepObject)); - | ^ - 42 | + 107 | } + 108 | + > 109 | const extraError = new Error(); + | ^ + 110 | + 111 | // Without this line v8 stores references to all closures + 112 | // in the stack in the Error object. This line stringifies the stack at __tests__/during_tests.test.js:41:1 " 34 | expect(cleanStderr(stderr)).toMatchSnapshot(); 35 | stderr = runJest(dir, ['during_tests.test.js']).stderr; > 36 | expect(cleanStderr(stderr)).toMatchSnapshot(); | ^ 37 | }); 38 | 39 | test('works with node assert', () => { at Object.toMatchSnapshot (e2e/__tests__/failures.test.js:36:31) ● works with async failures expect(value).toMatchSnapshot() Received value does not match stored snapshot "works with async failures 1". - Snapshot + Received @@ -22,17 +22,17 @@ Object { - "baz": "bar", + "foo": "bar", } - 10 | - 11 | test('resolve, but fail', () => - > 12 | expect(Promise.resolve({foo: 'bar'})).resolves.toEqual({baz: 'bar'})); - | ^ - 13 | - 14 | test('reject, but fail', () => - 15 | expect(Promise.reject({foo: 'bar'})).rejects.toEqual({baz: 'bar'})); + 171 | } + 172 | + > 173 | const innerErr = new JestAssertionError(); + | ^ + 174 | + 175 | return actual.then( + 176 | result => at __tests__/async_failures.test.js:12:50 ● reject, but fail @@ -51,64 +51,64 @@ Object { - "baz": "bar", + "foo": "bar", } - 13 | - 14 | test('reject, but fail', () => - > 15 | expect(Promise.reject({foo: 'bar'})).rejects.toEqual({baz: 'bar'})); - | ^ - 16 | - 17 | test('expect reject', () => - 18 | expect(Promise.resolve({foo: 'bar'})).rejects.toEqual({foo: 'bar'})); + 216 | } + 217 | + > 218 | const innerErr = new JestAssertionError(); + | ^ + 219 | + 220 | return actual.then( + 221 | result => { at __tests__/async_failures.test.js:15:48 ● expect reject expect(received).rejects.toEqual() Expected received Promise to reject, instead it resolved to value {"foo": "bar"} - 16 | - 17 | test('expect reject', () => - > 18 | expect(Promise.resolve({foo: 'bar'})).rejects.toEqual({foo: 'bar'})); - | ^ - 19 | - 20 | test('expect resolve', () => - 21 | expect(Promise.reject({foo: 'bar'})).resolves.toEqual({foo: 'bar'})); + 99 | }; + 100 | + > 101 | const err = new JestAssertionError(); + | ^ + 102 | + 103 | Object.keys(allMatchers).forEach(name => { + 104 | const matcher = allMatchers[name]; at __tests__/async_failures.test.js:18:3 ● expect resolve expect(received).resolves.toEqual() Expected received Promise to resolve, instead it rejected to value {"foo": "bar"} - 19 | - 20 | test('expect resolve', () => - > 21 | expect(Promise.reject({foo: 'bar'})).resolves.toEqual({foo: 'bar'})); - | ^ - 22 | - 23 | test( - 24 | 'timeout', + 99 | }; + 100 | + > 101 | const err = new JestAssertionError(); + | ^ + 102 | + 103 | Object.keys(allMatchers).forEach(name => { + 104 | const matcher = allMatchers[name]; at __tests__/async_failures.test.js:21:3 ● timeout - 21 | expect(Promise.reject({foo: 'bar'})).resolves.toEqual({foo: 'bar'})); - 22 | - > 23 | test( - | ^ - 24 | 'timeout', - 25 | done => { - 26 | setTimeout(done, 50); + 83 | this.throwOnExpectationFailure = !!attrs.throwOnExpectationFailure; + 84 | + > 85 | this.initError = new Error(); + | ^ + 86 | this.initError.name = ''; + 87 | + 88 | // Without this line v8 stores references to all closures at __tests__/async_failures.test.js:23:1 " 162 | .replace(/.*Timeout - Async callback was not.*/, ''); 163 | > 164 | expect(result).toMatchSnapshot(); | ^ 165 | }); 166 | 167 | test('works with snapshot failures', () => { at Object.toMatchSnapshot (e2e/__tests__/failures.test.js:164:18) › 2 snapshots failed. PASS packages/jest-runtime/src/__tests__/runtime_mock.test.js PASS packages/pretty-format/src/__tests__/dom_collection.test.js PASS packages/jest-snapshot/src/__tests__/mock_serializer.test.js PASS packages/jest-cli/src/__tests__/watch_filename_pattern_mode.test.js PASS e2e/__tests__/jasmine_async.test.js (51.256s) PASS packages/jest-jasmine2/src/__tests__/queueRunner.test.js PASS packages/jest-cli/src/__tests__/watch_test_name_pattern_mode.test.js PASS packages/expect/src/__tests__/extend.test.js PASS packages/expect/src/__tests__/utils.test.js PASS packages/jest-util/src/__tests__/console.test.js PASS packages/jest-worker/src/__tests__/index-integration.test.js PASS packages/jest-util/src/__tests__/bufferedConsole.test.js PASS e2e/__tests__/transform.test.js (50.81s) PASS e2e/__tests__/custom_reporters.test.js (41.785s) PASS e2e/__tests__/coverage_report.test.js (107.52s) PASS packages/jest-cli/src/reporters/__tests__/summary_reporter.test.js PASS e2e/__tests__/to_throw_error_matching_snapshot.test.js (18.083s) PASS e2e/__tests__/find_related_files.test.js (23.776s) PASS packages/jest-matcher-utils/src/__tests__/index.test.js PASS packages/jest-message-util/src/__tests__/messages.test.js PASS packages/jest-resolve-dependencies/src/__tests__/dependency_resolver.test.js PASS e2e/__tests__/stack_trace.test.js (23.338s) PASS packages/jest-cli/src/reporters/__tests__/utils.test.js PASS packages/jest-haste-map/src/lib/__tests__/extractRequires.test.js PASS packages/jest-util/src/__tests__/createProcessObject.test.js PASS packages/jest-snapshot/src/__tests__/snapshot_resolver.test.js PASS e2e/__tests__/json_reporter.test.js (7.52s) RUNS packages/jest-runner/src/__tests__/test_runner.test.js RUNS e2e/__tests__/to_throw_error_matching_inline_snapshot.test.js RUNS packages/jest-cli/src/__tests__/TestScheduler.test.js Test Suites: 3 failed, 76 passed, 79 of 295 total Tests: 12 failed, 2349 passed, 2361 total Snapshots: 5 failed, 10 obsolete, 1075 passed, 1080 total Test Suites: 0 of 2 total Tests: 0 total PASS packages/jest-cli/src/__tests__/TestScheduler.test.js PASS packages/jest-runner/src/__tests__/test_runner.test.js PASS packages/jest-leak-detector/src/__tests__/index.test.js PASS e2e/__tests__/dependency_clash.test.js (5.89s) PASS packages/jest-circus/src/__tests__/circus_it_test_error.test.js PASS packages/jest-config/src/__tests__/resolveConfigPath.test.js PASS packages/jest-watcher/src/lib/__tests__/format_test_name_by_pattern.test.js PASS packages/jest-cli/src/reporters/__tests__/get_snapshot_summary.test.js PASS packages/jest-cli/src/__tests__/runJestWithCoverage.test.js PASS e2e/__tests__/test_retries.test.js ● Console console.warn scripts/ConditionalTest.js:19 [SKIP] Does not work on Jasmine PASS packages/jest-serializer/src/__tests__/index.test.js FAIL e2e/__tests__/to_throw_error_matching_inline_snapshot.test.js (18.872s) ● works fine when function throws error expect(received).toMatch(expected) Expected value to match: "1 snapshot written from 1 test suite." Received: "FAIL __tests__/works-fine-when-function-throws-error.test.js ● Test suite failed to run Jest: Couldn't locate all inline snapshots. 198 | 199 | if (remainingSnapshots.size) { > 200 | throw new Error(`Jest: Couldn't locate all inline snapshots.`); | ^ 201 | } 202 | 203 | return ast; at Object.parse (../../packages/jest-snapshot/build/inline_snapshots.js:200:11) Test Suites: 1 failed, 1 total Tests: 0 total Snapshots: 0 total Time: 3.286s Ran all test suites matching /works-fine-when-function-throws-error.test.js/i. " 37 | const {stderr, status} = runJest(DIR, ['-w=1', '--ci=false', filename]); 38 | const fileAfter = readFile(filename); > 39 | expect(stderr).toMatch('1 snapshot written from 1 test suite.'); | ^ 40 | expect(fileAfter).toMatchSnapshot('initial write'); 41 | expect(status).toBe(0); 42 | } at Object.toMatch (e2e/__tests__/to_throw_error_matching_inline_snapshot.test.js:39:20) ● updates existing snapshot expect(received).toMatch(expected) Expected value to match: "1 snapshot updated from 1 test suite." Received: "FAIL __tests__/updates-existing-snapshot.test.js ● Test suite failed to run Jest: Couldn't locate all inline snapshots. 198 | 199 | if (remainingSnapshots.size) { > 200 | throw new Error(`Jest: Couldn't locate all inline snapshots.`); | ^ 201 | } 202 | 203 | return ast; at Object.parse (../../packages/jest-snapshot/build/inline_snapshots.js:200:11) Test Suites: 1 failed, 1 total Tests: 0 total Snapshots: 0 total Time: 3.539s Ran all test suites matching /updates-existing-snapshot.test.js/i. " 63 | ]); 64 | const fileAfter = readFile(filename); > 65 | expect(stderr).toMatch('1 snapshot updated from 1 test suite.'); | ^ 66 | expect(fileAfter).toMatchSnapshot('updated snapshot'); 67 | expect(status).toBe(0); 68 | } at Object.toMatch (e2e/__tests__/to_throw_error_matching_inline_snapshot.test.js:65:20) ● should support rejecting promises expect(received).toMatch(expected) Expected value to match: "1 snapshot written from 1 test suite." Received: "FAIL __tests__/should-support-rejecting-promises.test.js ● Test suite failed to run Jest: Couldn't locate all inline snapshots. 198 | 199 | if (remainingSnapshots.size) { > 200 | throw new Error(`Jest: Couldn't locate all inline snapshots.`); | ^ 201 | } 202 | 203 | return ast; at Object.parse (../../packages/jest-snapshot/build/inline_snapshots.js:200:11) Test Suites: 1 failed, 1 total Tests: 0 total Snapshots: 0 total Time: 3.225s Ran all test suites matching /should-support-rejecting-promises.test.js/i. " 99 | const {stderr, status} = runJest(DIR, ['-w=1', '--ci=false', filename]); 100 | const fileAfter = readFile(filename); > 101 | expect(stderr).toMatch('1 snapshot written from 1 test suite.'); | ^ 102 | expect(fileAfter).toMatchSnapshot(); 103 | expect(status).toBe(0); 104 | }); at Object.toMatch (e2e/__tests__/to_throw_error_matching_inline_snapshot.test.js:101:18) › 2 snapshots obsolete. • updates existing snapshot: updated snapshot 1 • works fine when function throws error: initial write 1 PASS packages/jest-jasmine2/src/__tests__/iterators.test.js PASS e2e/__tests__/unexpected-token.test.js (12.899s) PASS packages/jest-cli/src/lib/__tests__/is_valid_path.test.js PASS e2e/__tests__/haste_map_sha1.test.js PASS e2e/__tests__/timeouts_legacy.test.js (17.319s) PASS packages/jest-runtime/src/__tests__/runtime_node_path.test.js FAIL e2e/__tests__/watch_mode_patterns.test.js (16.809s) ● can press "p" to filter by file name expect(value).toMatchSnapshot() Received value does not match stored snapshot "can press "p" to filter by file name 1". - Snapshot + Received + " Pattern Mode Usage › Press Esc to exit pattern mode. › Press Enter to filter by a filenames regex pattern. - pattern › - pattern › b - pattern › ba - pattern › bar + pattern › pattern › b pattern › ba pattern › bar + + " 54 | const results = extractSummaries(stderr); 55 | > 56 | expect(stdout).toMatchSnapshot(); | ^ 57 | expect(results).toHaveLength(2); 58 | results.forEach(({rest, summary}) => { 59 | expect(rest).toMatchSnapshot('test results'); at Object.toMatchSnapshot (e2e/__tests__/watch_mode_patterns.test.js:56:18) ● can press "t" to filter by test name expect(value).toMatchSnapshot() Received value does not match stored snapshot "can press "t" to filter by test name 1". - Snapshot + Received + " Pattern Mode Usage › Press Esc to exit pattern mode. › Press Enter to filter by a tests regex pattern. - pattern › - pattern › 2 + pattern › pattern › 2 + + " 73 | const results = extractSummaries(stderr); 74 | > 75 | expect(stdout).toMatchSnapshot(); | ^ 76 | expect(results).toHaveLength(2); 77 | results.forEach(({rest, summary}) => { 78 | expect(rest).toMatchSnapshot('test results'); at Object.toMatchSnapshot (e2e/__tests__/watch_mode_patterns.test.js:75:18) › 2 snapshots failed. PASS e2e/__tests__/jest.config.js.test.js (11.483s) PASS packages/jest-cli/src/reporters/__tests__/default_reporter.test.js PASS packages/jest-jasmine2/src/__tests__/expectationResultFactory.test.js PASS packages/jest-util/src/__tests__/getCallsite.test.js PASS packages/jest-circus/src/__tests__/hooks.test.js (8.845s) PASS e2e/__tests__/detect_open_handles.js (19.051s) PASS packages/jest-runtime/src/__tests__/runtime_jest_fn.js PASS packages/jest-cli/src/__tests__/cli/args.test.js PASS packages/jest-circus/src/__tests__/after_all.test.js (5.878s) PASS e2e/__tests__/global_teardown.test.js (13.915s) PASS e2e/__tests__/each.test.js (27.88s) PASS e2e/__tests__/mock_names.test.js (33.269s) PASS packages/jest-regex-util/src/__tests__/index.test.js PASS e2e/__tests__/execute-tests-once-in-mpr.js (6.691s) PASS e2e/__tests__/location_in_results.test.js (8.538s) PASS packages/jest-runtime/src/__tests__/runtime_module_directories.test.js PASS examples/async/__tests__/user.test.js PASS packages/jest-util/src/__tests__/isInteractive.test.js PASS e2e/__tests__/no_tests_found.test.js (9.715s) PASS e2e/__tests__/setup_files_after_env_config.test.js (13.307s) PASS e2e/__tests__/console.test.js (17.643s) PASS e2e/__tests__/config.test.js (17.531s) PASS packages/jest-runtime/src/__tests__/runtime_gen_mock_from_module.test.js PASS packages/jest-jasmine2/src/__tests__/itTestError.test.js PASS packages/jest-haste-map/src/lib/__tests__/fast_path.test.js PASS packages/jest-cli/src/__tests__/FailedTestsCache.test.js PASS e2e/__tests__/global_setup.test.js (11.422s) PASS examples/react-native/__tests__/intro.test.js (30.731s) PASS packages/jest-runtime/src/__tests__/runtime_environment.test.js PASS e2e/__tests__/watch_mode_update_snapshot.test.js (8.026s) PASS packages/jest-runtime/src/__tests__/runtime_cli.test.js (19.199s) PASS e2e/__tests__/watch_mode_only_failed.test.js (8.024s) PASS packages/jest-config/src/__tests__/setFromArgv.test.js PASS packages/jest-watcher/src/lib/__tests__/prompt.test.js PASS packages/pretty-format/src/__tests__/convert_ansi.test.js PASS e2e/__tests__/cli-handles-exact-filenames.test.js PASS packages/expect/src/__tests__/stacktrace.test.js PASS packages/jest-jasmine2/src/__tests__/pTimeout.test.js PASS packages/jest-util/src/__tests__/getFailedSnapshot.test.js PASS e2e/__tests__/timeouts.test.js (10.167s) PASS e2e/__tests__/jest_require_actual.test.js (9.757s) PASS packages/expect/src/__tests__/is_error.test.js PASS e2e/__tests__/jest_require_mock.test.js (9.845s) PASS packages/jest-cli/src/reporters/__tests__/coverage_worker.test.js PASS packages/jest-runtime/src/__tests__/runtime_jest_spy_on.test.js PASS packages/jest-snapshot/src/__tests__/throw_matcher.test.js PASS packages/jest-watcher/src/lib/__tests__/scroll_list.test.js PASS examples/timer/__tests__/timer_game.test.js ● Console console.log examples/timer/timerGame.js:4 Ready....go! console.log examples/timer/timerGame.js:4 Ready....go! console.log examples/timer/timerGame.js:6 Times up -- stop! console.log examples/timer/timerGame.js:6 Times up -- stop! console.log examples/timer/timerGame.js:4 Ready....go! console.log examples/timer/timerGame.js:6 Times up -- stop! PASS e2e/__tests__/run_tests_by_path.test.js (9.519s) FAIL e2e/__tests__/show_config.test.js ● --showConfig outputs config info and exits expect(value).toMatchSnapshot() Received value does not match stored snapshot "--showConfig outputs config info and exits 1". - Snapshot + Received @@ -54,17 +54,17 @@ ], "testPathIgnorePatterns": [ "/node_modules/" ], "testRegex": [], - "testRunner": "<>/jest-jasmine2/build/index.js", + "testRunner": "/Users/asp/GitHub/jest-2/packages/jest-jasmine2/build/index.js", "testURL": "http://localhost", "timers": "real", "transform": [ [ "^.+\\\\.jsx?$", - "<>/babel-jest/build/index.js" + "/Users/asp/GitHub/jest-2/packages/babel-jest/build/index.js" ] ], "transformIgnorePatterns": [ "/node_modules/" ], 44 | .replace(/\"\S*\/jest\/packages/gm, '"<>'); 45 | > 46 | expect(stdout).toMatchSnapshot(); | ^ 47 | }); 48 | at Object.toMatchSnapshot (e2e/__tests__/show_config.test.js:46:18) › 1 snapshot failed. PASS e2e/__tests__/empty-describe-with-hooks.test.js ● Console console.warn scripts/ConditionalTest.js:19 [SKIP] Does not work on Jasmine PASS examples/jquery/__tests__/fetch_current_user.test.js PASS e2e/__tests__/snapshot_serializers.test.js (8.164s) PASS packages/jest-runtime/src/__tests__/runtime_internal_module.test.js PASS packages/jest-cli/src/reporters/__tests__/get_snapshot_status.test.js PASS e2e/__tests__/test-todo.test.js (13.662s) PASS e2e/__tests__/force_exit.test.js (7.138s) PASS packages/jest-environment-node/src/__tests__/node_environment.test.js PASS e2e/__tests__/filter.test.js (19.019s) FAIL e2e/__tests__/resolve_no_file_extensions.test.js (6.929s) ● show error message with matching files expect(value).toMatchSnapshot() Received value does not match stored snapshot "show error message with matching files 1". - Snapshot + Received @@ -8,15 +8,17 @@ You might want to include a file extension in your import, or update your 'moduleFileExtensions', which is currently ['js']. See https://jestjs.io/docs/en/configuration#modulefileextensions-array-string - 1 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. - 2 | - > 3 | module.exports = require('./some-json-file'); - | ^ - 4 | + 222 | from + 223 | ); + > 224 | const err = new Error( + | ^ + 225 | `Cannot find module '${moduleName}' from '${relativePath || '.'}'` + 226 | ); + 227 | err.code = 'MODULE_NOT_FOUND'; at packages/jest-resolve/build/index.js:224:17 at index.js:3:18 " 23 | 24 | expect(status).toBe(1); > 25 | expect(rest).toMatchSnapshot(); | ^ 26 | }); 27 | 28 | test('show error message when no js moduleFileExtensions', () => { at Object.toMatchSnapshot (e2e/__tests__/resolve_no_file_extensions.test.js:25:16) › 1 snapshot failed. PASS examples/snapshot/__tests__/link.react.test.js PASS e2e/__tests__/coverage_remapping.test.js (6.26s) PASS e2e/__tests__/list_tests.test.js PASS examples/module-mock/__tests__/mock_per_test.js PASS e2e/__tests__/coverage_transform_instrumented.test.js (12.609s) PASS packages/jest-cli/src/lib/__tests__/modify_package_json.test.js PASS e2e/__tests__/error-on-deprecated.test.js (83.144s) PASS packages/jest-jasmine2/src/__tests__/reporter.test.js PASS packages/babel-jest/src/__tests__/index.js PASS packages/jest-runtime/src/__tests__/Runtime-sourceMaps.test.js PASS packages/jest-circus/src/__tests__/circus_todo_test_error.test.js PASS e2e/__tests__/runtime_internal_module_registry.test.js (5.487s) PASS e2e/__tests__/snapshot_resolver.test.js PASS packages/expect/src/__tests__/symbol_in_objects.test.js PASS packages/jest-cli/src/lib/__tests__/log_debug_messages.test.js PASS packages/jest-get-type/src/__tests__/index.test.js PASS e2e/__tests__/test_failure_exit_code.test.js (11.645s) PASS packages/jest-cli/src/__tests__/generateEmptyCoverage.test.js PASS e2e/__tests__/use_stderr.test.js (6.64s) PASS packages/expect/src/__tests__/assertion_counts.test.js PASS e2e/__tests__/clear_cache.test.js (5.193s) PASS examples/jquery/__tests__/display_user.test.js PASS packages/jest-util/src/__tests__/installCommonGlobals.test.js PASS e2e/__tests__/test_path_pattern_reporter_message.test.js (26.939s) PASS packages/jest-runtime/src/__tests__/resolve_browser.test.js PASS packages/jest-validate/src/__tests__/validateCLIOptions.test.js PASS packages/jest-runtime/src/__tests__/instrumentation.test.js PASS packages/jest-cli/src/__tests__/run_jest.test.js PASS e2e/__tests__/env.test.js (14.142s) PASS examples/timer/__tests__/infinite_timer_game.test.js ● Console console.log examples/timer/infiniteTimerGame.js:4 Ready....go! console.log examples/timer/infiniteTimerGame.js:7 Times up! 10 seconds before the next game starts... PASS packages/jest-config/src/__tests__/getMaxWorkers.test.js PASS examples/module-mock/__tests__/partial_mock.js PASS packages/jest-circus/src/__tests__/base_test.test.js PASS e2e/__tests__/console_log_output_when_run_in_band.test.js (5.142s) PASS e2e/__tests__/version.test.js PASS packages/jest-util/src/__tests__/formatTestResults.test.js PASS packages/jest-haste-map/src/lib/__tests__/getPlatformExtension.test.js PASS packages/jest-config/src/__tests__/validatePattern.test.js PASS examples/react/__tests__/checkbox_with_label.test.js PASS packages/jest-haste-map/src/lib/__tests__/normalizePathSep.test.js PASS e2e/__tests__/no_test_found.test.js PASS packages/jest-jasmine2/src/__tests__/todoError.test.js FAIL e2e/__tests__/expect-async-matcher.test.js (7.842s) ● shows the correct errors in stderr when failing tests expect(value).toMatchSnapshot() Received value does not match stored snapshot "shows the correct errors in stderr when failing tests 1". - Snapshot + Received @@ -33,17 +33,17 @@ Received: 1 received.length: 1 - 22 | - 23 | it('fail with expected promise values', async () => { - > 24 | await (expect(Promise.resolve([1])): any).resolves.toHaveLengthAsync( - | ^ - 25 | Promise.resolve(2) - 26 | ); - 27 | }); + 171 | } + 172 | + > 173 | const innerErr = new JestAssertionError(); + | ^ + 174 | + 175 | return actual.then( + 176 | result => at __tests__/failure.test.js:24:54 at __tests__/failure.test.js:11:191 at __tests__/failure.test.js:11:437 at __tests__/failure.test.js:11:99 @@ -55,17 +55,17 @@ Received: 1,2 received.length: 2 - 28 | - 29 | it('fail with expected promise values and not', async () => { - > 30 | await (expect(Promise.resolve([1, 2])).resolves.not: any).toHaveLengthAsync( - | ^ - 31 | Promise.resolve(2) - 32 | ); - 33 | }); + 171 | } + 172 | + > 173 | const innerErr = new JestAssertionError(); + | ^ + 174 | + 175 | return actual.then( + 176 | result => at __tests__/failure.test.js:30:61 at __tests__/failure.test.js:11:191 at __tests__/failure.test.js:11:437 at __tests__/failure.test.js:11:99 30 | .join('\n'); 31 | > 32 | expect(rest).toMatchSnapshot(); | ^ 33 | }); 34 | at Object.toMatchSnapshot (e2e/__tests__/expect-async-matcher.test.js:32:16) › 1 snapshot failed. PASS packages/jest-circus/src/__tests__/hooks_error.test.js PASS e2e/__tests__/log_heap_usage.test.js PASS examples/typescript/__tests__/checkbox_with_label.test.tsx PASS e2e/__tests__/deprecated_cli_options.test.js (5.834s) PASS packages/jest-each/src/__tests__/index.test.js PASS e2e/__tests__/promise_reject.test.js (5.807s) PASS packages/jest-jasmine2/src/__tests__/hooksError.test.js PASS e2e/__tests__/jasmine_async_with_pending_during_test.js FAIL e2e/__tests__/module_name_mapper.test.js (11.649s) ● moduleNameMapper wrong configuration expect(value).toMatchSnapshot() Received value does not match stored snapshot "moduleNameMapper wrong configuration 1". - Snapshot + Received @@ -12,17 +12,17 @@ "/\\.(css|less)$/": "no-such-module" }, "resolver": null } - 8 | 'use strict'; - 9 | - > 10 | require('./style.css'); - | ^ - 11 | - 12 | module.exports = () => 'test'; - 13 | + 408 | resolver + 409 | ) => { + > 410 | const error = new Error( + | ^ + 411 | (_chalk || _load_chalk()).default.red(`${( + 412 | _chalk || _load_chalk() + 413 | ).default.bold('Configuration error')}: at packages/jest-resolve/build/index.js:410:17 at index.js:10:1 " 17 | 18 | expect(status).toBe(1); > 19 | expect(rest).toMatchSnapshot(); | ^ 20 | }); 21 | 22 | test('moduleNameMapper correct configuration', () => { at Object.toMatchSnapshot (e2e/__tests__/module_name_mapper.test.js:19:16) › 1 snapshot failed. PASS packages/jest-util/src/__tests__/errorWithStack.test.js PASS e2e/__tests__/native_async_mock.test.js PASS packages/jest-repl/src/__tests__/jest_repl.test.js (5.341s) PASS e2e/__tests__/resolve-with-paths.test.js PASS e2e/__tests__/test_in_root.test.js (5.504s) PASS e2e/__tests__/override-globals.test.js (7.422s) PASS e2e/__tests__/stack_trace_source_maps.test.js (5.747s) PASS packages/jest-snapshot/src/__tests__/matcher.test.js PASS packages/jest-runtime/src/__tests__/runtime_require_module_no_ext.test.js PASS examples/manual-mocks/__tests__/file_summarizer.test.js PASS packages/jest-environment-jsdom/src/__tests__/jsdom_environment.test.js PASS e2e/__tests__/test_environment_async.test.js (5.489s) PASS packages/jest-resolve/src/__tests__/isBuiltinModule.test.js PASS e2e/__tests__/debug.test.js PASS e2e/__tests__/fake-promises.test.js (7.35s) PASS examples/enzyme/__tests__/checkbox_with_label.test.js PASS e2e/__tests__/require_after_teardown.test.js PASS e2e/__tests__/babel_plugin_jest_hoist.test.js (13.382s) PASS e2e/__tests__/empty_suite_error.test.js PASS e2e/__tests__/test_results_processor.test.js PASS e2e/__tests__/custom_matcher_stack_trace.test.js PASS e2e/__tests__/test_environment.test.js (5.638s) PASS e2e/__tests__/test_name_pattern_skipped.test.js PASS packages/jest-haste-map/src/__tests__/get_mock_name.test.js PASS e2e/__tests__/typescript_coverage.test.js (6.698s) PASS e2e/__tests__/test_name_pattern.test.js PASS e2e/__tests__/timer_reset_mocks.test.js (8.204s) PASS packages/jest-jasmine2/src/__tests__/Suite.test.js PASS e2e/timer-reset-mocks/after-reset-all-mocks/timer_and_mock.test.js PASS e2e/__tests__/auto_restore_mocks.test.js (8.397s) PASS examples/automatic-mocks/__tests__/genMockFromModule.test.js PASS e2e/__tests__/auto_reset_mocks.test.js (8.081s) PASS e2e/__tests__/auto_clear_mocks.test.js (8.155s) PASS e2e/__tests__/regex_(char_in_path.test.js PASS e2e/__tests__/verbose.test.js PASS e2e/__tests__/stack_trace_no_captureStackTrace.test.js PASS e2e/__tests__/require_main.test.js PASS e2e/__tests__/transform-linked-modules.test.js PASS e2e/__tests__/timer_use_real_timers.test.js PASS packages/expect/src/__tests__/fake_chalk.test.js PASS e2e/__tests__/node_path.test.js PASS e2e/__tests__/before-all-filtered.js (6.203s) PASS examples/automatic-mocks/__tests__/automock.test.js PASS e2e/__tests__/before-each-queue.js (5.885s) PASS packages/jest-config/src/__tests__/readConfig.test.js PASS packages/jest-cli/src/__tests__/globals.test.js PASS e2e/__tests__/compare_dom_nodes.test.js (5.627s) PASS e2e/__tests__/json.test.js PASS e2e/__tests__/presets.test.js (11.059s) PASS e2e/__tests__/lifecycles.js PASS e2e/__tests__/set_immediate.test.js PASS e2e/__tests__/reset_modules.test.js PASS e2e/__tests__/bad_source_map.test.js PASS e2e/__tests__/expect_in_vm.test.js PASS e2e/__tests__/process_exit.test.js PASS examples/snapshot/__tests__/clock.react.test.js PASS e2e/__tests__/module_parent_null_in_test.js (5.684s) PASS e2e/__tests__/nested_event_loop.test.js (5.832s) PASS e2e/__tests__/custom-resolver.test.js (5.771s) PASS e2e/__tests__/resolve-node-module.test.js PASS e2e/__tests__/generator_mock.test.js PASS packages/jest-jasmine2/src/__tests__/matchers.test.js PASS e2e/__tests__/require_v8_module.test.js PASS e2e/__tests__/resolve-get-paths.test.js PASS examples/module-mock/__tests__/full_mock.js PASS e2e/__tests__/symbol.test.js PASS e2e/__tests__/global.test.js PASS packages/jest-config/src/__tests__/readConfigs.test.js PASS e2e/timer-reset-mocks/with-reset-mocks/timer_with_mock.test.js PASS examples/typescript/__tests__/sum-test.ts PASS e2e/test-in-root/test.js PASS e2e/test-in-root/spec.js PASS packages/jest-jasmine2/src/__tests__/itToTestAlias.test.js PASS examples/typescript/__tests__/sum.test.js PASS examples/manual-mocks/__tests__/userMocked.test.js PASS examples/manual-mocks/__tests__/user.test.js PASS examples/automatic-mocks/__tests__/disableAutomocking.test.js PASS packages/jest-config/src/__tests__/Defaults.test.js FAIL examples/manual-mocks/__tests__/lodashMocking.test.js ● if lodash head is mocked expect(received).toEqual(expected) Expected value to equal: 5 Received: 2 4 | 5 | test('if lodash head is mocked', () => { > 6 | expect(lodash.head([2, 3])).toEqual(5); | ^ 7 | }); 8 | at Object.toEqual (__tests__/lodashMocking.test.js:6:31) PASS e2e/__tests__/resolve.test.js (5.973s) PASS examples/typescript/__tests__/sub-test.ts PASS examples/babel-7/__tests__/index.test.js PASS e2e/global-setup/custom_tests_dir/pass.test.js PASS e2e/global-teardown/custom_tests_dir/pass.test.js PASS examples/getting-started/sum.test.js Summary of all failing tests FAIL e2e/__tests__/to_match_inline_snapshot.test.js (38.069s) ● basic support expect(received).toMatch(expected) Expected value to match: "1 snapshot written from 1 test suite." Received: "FAIL __tests__/basic-support.test.js ● Test suite failed to run Jest: Couldn't locate all inline snapshots. 198 | 199 | if (remainingSnapshots.size) { > 200 | throw new Error(`Jest: Couldn't locate all inline snapshots.`); | ^ 201 | } 202 | 203 | return ast; at Object.parse (../../packages/jest-snapshot/build/inline_snapshots.js:200:11) Test Suites: 1 failed, 1 total Tests: 0 total Snapshots: 0 total Time: 3.1s Ran all test suites matching /basic-support.test.js/i. " 34 | const {stderr, status} = runJest(DIR, ['-w=1', '--ci=false', filename]); 35 | const fileAfter = readFile(filename); > 36 | expect(stderr).toMatch('1 snapshot written from 1 test suite.'); | ^ 37 | expect(status).toBe(0); 38 | expect(fileAfter).toMatchSnapshot('initial write'); 39 | } at Object.toMatch (e2e/__tests__/to_match_inline_snapshot.test.js:36:20) ● handles property matchers expect(received).toMatch(expected) Expected value to match: "1 snapshot written from 1 test suite." Received: "FAIL __tests__/handle-property-matchers.test.js ● Test suite failed to run Jest: Couldn't locate all inline snapshots. 198 | 199 | if (remainingSnapshots.size) { > 200 | throw new Error(`Jest: Couldn't locate all inline snapshots.`); | ^ 201 | } 202 | 203 | return ast; at Object.parse (../../packages/jest-snapshot/build/inline_snapshots.js:200:11) Test Suites: 1 failed, 1 total Tests: 0 total Snapshots: 0 total Time: 3.835s Ran all test suites matching /handle-property-matchers.test.js/i. " 84 | const {stderr, status} = runJest(DIR, ['-w=1', '--ci=false', filename]); 85 | const fileAfter = readFile(filename); > 86 | expect(stderr).toMatch('1 snapshot written from 1 test suite.'); | ^ 87 | expect(status).toBe(0); 88 | expect(fileAfter).toMatchSnapshot('initial write'); 89 | } at Object.toMatch (e2e/__tests__/to_match_inline_snapshot.test.js:86:20) ● removes obsolete external snapshots expect(received).toMatch(expected) Expected value to match: "Snapshots: 1 obsolete, 1 written, 1 total" Received: "FAIL __tests__/removes-obsolete-external-snapshots.test.js ● Test suite failed to run Jest: Couldn't locate all inline snapshots. 198 | 199 | if (remainingSnapshots.size) { > 200 | throw new Error(`Jest: Couldn't locate all inline snapshots.`); | ^ 201 | } 202 | 203 | return ast; at Object.parse (../../packages/jest-snapshot/build/inline_snapshots.js:200:11) Test Suites: 1 failed, 1 total Tests: 0 total Snapshots: 0 total Time: 3.32s Ran all test suites matching /removes-obsolete-external-snapshots.test.js/i. " 155 | const {stderr, status} = runJest(DIR, ['-w=1', '--ci=false', filename]); 156 | const fileAfter = readFile(filename); > 157 | expect(stderr).toMatch('Snapshots: 1 obsolete, 1 written, 1 total'); | ^ 158 | expect(status).toBe(1); 159 | expect(fileAfter).toMatchSnapshot('inline snapshot written'); 160 | expect(fs.existsSync(snapshotPath)).toEqual(true); at Object.toMatch (e2e/__tests__/to_match_inline_snapshot.test.js:157:20) ● supports async matchers expect(received).toMatch(expected) Expected value to match: "2 snapshots written from 1 test suite." Received: "FAIL __tests__/async-matchers.test.js ● Test suite failed to run Jest: Couldn't locate all inline snapshots. 198 | 199 | if (remainingSnapshots.size) { > 200 | throw new Error(`Jest: Couldn't locate all inline snapshots.`); | ^ 201 | } 202 | 203 | return ast; at Object.parse (../../packages/jest-snapshot/build/inline_snapshots.js:200:11) Test Suites: 1 failed, 1 total Tests: 0 total Snapshots: 0 total Time: 3.501s Ran all test suites matching /async-matchers.test.js/i. " 188 | const {stderr, status} = runJest(DIR, ['-w=1', '--ci=false', filename]); 189 | const fileAfter = readFile(filename); > 190 | expect(stderr).toMatch('2 snapshots written from 1 test suite.'); | ^ 191 | expect(status).toBe(0); 192 | expect(fileAfter).toMatchSnapshot(); 193 | }); at Object.toMatch (e2e/__tests__/to_match_inline_snapshot.test.js:190:18) ● supports async tests expect(received).toMatch(expected) Expected value to match: "1 snapshot written from 1 test suite." Received: "FAIL __tests__/async.test.js ● Test suite failed to run Jest: Couldn't locate all inline snapshots. 198 | 199 | if (remainingSnapshots.size) { > 200 | throw new Error(`Jest: Couldn't locate all inline snapshots.`); | ^ 201 | } 202 | 203 | return ast; at Object.parse (../../packages/jest-snapshot/build/inline_snapshots.js:200:11) Test Suites: 1 failed, 1 total Tests: 0 total Snapshots: 0 total Time: 3.945s Ran all test suites matching /async.test.js/i. " 205 | const {stderr, status} = runJest(DIR, ['-w=1', '--ci=false', filename]); 206 | const fileAfter = readFile(filename); > 207 | expect(stderr).toMatch('1 snapshot written from 1 test suite.'); | ^ 208 | expect(status).toBe(0); 209 | expect(fileAfter).toMatchSnapshot(); 210 | }); at Object.toMatch (e2e/__tests__/to_match_inline_snapshot.test.js:207:18) ● writes snapshots with non-literals in expect(...) expect(received).toMatch(expected) Expected value to match: "1 snapshot written from 1 test suite." Received: "FAIL __tests__/async.test.js ● Test suite failed to run Jest: Couldn't locate all inline snapshots. 198 | 199 | if (remainingSnapshots.size) { > 200 | throw new Error(`Jest: Couldn't locate all inline snapshots.`); | ^ 201 | } 202 | 203 | return ast; at Object.parse (../../packages/jest-snapshot/build/inline_snapshots.js:200:11) Test Suites: 1 failed, 1 total Tests: 0 total Snapshots: 0 total Time: 3.078s Ran all test suites matching /async.test.js/i. " 222 | 223 | const fileAfter = readFile(filename); > 224 | expect(stderr).toMatch('1 snapshot written from 1 test suite.'); | ^ 225 | expect(status).toBe(0); 226 | expect(fileAfter).toMatchSnapshot(); 227 | }); at Object.toMatch (e2e/__tests__/to_match_inline_snapshot.test.js:224:18) ● handles mocking native modules prettier relies on expect(received).toMatch(expected) Expected value to match: "1 snapshot written from 1 test suite." Received: "FAIL __tests__/mockFail.test.js ● Test suite failed to run Jest: Couldn't locate all inline snapshots. 198 | 199 | if (remainingSnapshots.size) { > 200 | throw new Error(`Jest: Couldn't locate all inline snapshots.`); | ^ 201 | } 202 | 203 | return ast; at Object.parse (../../packages/jest-snapshot/build/inline_snapshots.js:200:11) Test Suites: 1 failed, 1 total Tests: 0 total Snapshots: 0 total Time: 3.057s Ran all test suites matching /mockFail.test.js/i. " 240 | writeFiles(TESTS_DIR, {[filename]: test}); 241 | const {stderr, status} = runJest(DIR, ['-w=1', '--ci=false', filename]); > 242 | expect(stderr).toMatch('1 snapshot written from 1 test suite.'); | ^ 243 | expect(status).toBe(0); 244 | }); 245 | at Object.toMatch (e2e/__tests__/to_match_inline_snapshot.test.js:242:18) FAIL e2e/__tests__/globals.test.js (36.35s) ● cannot have describe with no implementation expect(value).toMatchSnapshot() Received value does not match stored snapshot "cannot have describe with no implementation 1". - Snapshot + Received "FAIL __tests__/only-constructs.test.js ● Test suite failed to run Missing second argument. It must be a callback function. - 1 | - > 2 | describe('describe, no implementation'); - | ^ - 3 | + 301 | const suite = suiteFactory(description); + 302 | if (specDefinitions === undefined) { + > 303 | throw new Error( + | ^ + 304 | `Missing second argument. It must be a callback function.` + 305 | ); + 306 | } at __tests__/only-constructs.test.js:2:5 " 129 | const rest = cleanStderr(stderr); 130 | const {summary} = extractSummary(stderr); > 131 | expect(rest).toMatchSnapshot(); | ^ 132 | expect(summary).toMatchSnapshot(); 133 | }); 134 | at Object.toMatchSnapshot (e2e/__tests__/globals.test.js:131:16) ● cannot test with no implementation expect(value).toMatchSnapshot() Received value does not match stored snapshot "cannot test with no implementation 1". - Snapshot + Received "FAIL __tests__/only-constructs.test.js ● Test suite failed to run Missing second argument. It must be a callback function. Perhaps you want to use `test.todo` for a test placeholder. - 1 | - 2 | it('it', () => {}); - > 3 | it('it, no implementation'); - | ^ - 4 | test('test, no implementation'); - 5 | + 442 | } + 443 | if (fn === undefined) { + > 444 | throw new Error( + | ^ + 445 | 'Missing second argument. It must be a callback function. Perhaps you want to use `test.todo` for a test placeholder.' + 446 | ); + 447 | } at __tests__/only-constructs.test.js:3:5 " 146 | 147 | const {summary} = extractSummary(stderr); > 148 | expect(cleanStderr(stderr)).toMatchSnapshot(); | ^ 149 | expect(summary).toMatchSnapshot(); 150 | }); 151 | at Object.toMatchSnapshot (e2e/__tests__/globals.test.js:148:31) ● cannot test with no implementation with expand arg expect(value).toMatchSnapshot() Received value does not match stored snapshot "cannot test with no implementation with expand arg 1". - Snapshot + Received "FAIL __tests__/only-constructs.test.js ● Test suite failed to run Missing second argument. It must be a callback function. Perhaps you want to use `test.todo` for a test placeholder. - 1 | - 2 | it('it', () => {}); - > 3 | it('it, no implementation'); - | ^ - 4 | test('test, no implementation'); - 5 | + 442 | } + 443 | if (fn === undefined) { + > 444 | throw new Error( + | ^ + 445 | 'Missing second argument. It must be a callback function. Perhaps you want to use `test.todo` for a test placeholder.' + 446 | ); + 447 | } at __tests__/only-constructs.test.js:3:5 " 224 | 225 | const {summary} = extractSummary(stderr); > 226 | expect(cleanStderr(stderr)).toMatchSnapshot(); | ^ 227 | expect(summary).toMatchSnapshot(); 228 | }); 229 | at Object.toMatchSnapshot (e2e/__tests__/globals.test.js:226:31) FAIL e2e/__tests__/failures.test.js (42.994s) ● not throwing Error objects expect(value).toMatchSnapshot() Received value does not match stored snapshot "not throwing Error objects 5". - Snapshot + Received @@ -10,45 +10,45 @@ ● Promise thrown during test thrown: Promise {} - 7 | }; - 8 | - > 9 | test('Promise thrown during test', () => { - | ^ - 10 | throw Promise.resolve(5); - 11 | }); - 12 | + 83 | this.throwOnExpectationFailure = !!attrs.throwOnExpectationFailure; + 84 | + > 85 | this.initError = new Error(); + | ^ + 86 | this.initError.name = ''; + 87 | + 88 | // Without this line v8 stores references to all closures at __tests__/during_tests.test.js:9:1 ● Boolean thrown during test thrown: false - 11 | }); - 12 | - > 13 | test('Boolean thrown during test', () => { - | ^ - 14 | // eslint-disable-next-line no-throw-literal - 15 | throw false; - 16 | }); + 83 | this.throwOnExpectationFailure = !!attrs.throwOnExpectationFailure; + 84 | + > 85 | this.initError = new Error(); + | ^ + 86 | this.initError.name = ''; + 87 | + 88 | // Without this line v8 stores references to all closures at __tests__/during_tests.test.js:13:1 ● undefined thrown during test thrown: undefined - 16 | }); - 17 | - > 18 | test('undefined thrown during test', () => { - | ^ - 19 | // eslint-disable-next-line no-throw-literal - 20 | throw undefined; - 21 | }); + 83 | this.throwOnExpectationFailure = !!attrs.throwOnExpectationFailure; + 84 | + > 85 | this.initError = new Error(); + | ^ + 86 | this.initError.name = ''; + 87 | + 88 | // Without this line v8 stores references to all closures at __tests__/during_tests.test.js:18:1 ● Object thrown during test @@ -59,17 +59,17 @@ "tooDeep": [Object], }, ], } - 21 | }); - 22 | - > 23 | test('Object thrown during test', () => { - | ^ - 24 | // eslint-disable-next-line no-throw-literal - 25 | throw deepObject; - 26 | }); + 83 | this.throwOnExpectationFailure = !!attrs.throwOnExpectationFailure; + 84 | + > 85 | this.initError = new Error(); + | ^ + 86 | this.initError.name = ''; + 87 | + 88 | // Without this line v8 stores references to all closures at __tests__/during_tests.test.js:23:1 ● Error during test @@ -108,17 +108,17 @@ "tooDeep": [Object], }, ], } - 36 | - 37 | test('done(non-error)', done => { - > 38 | done(deepObject); - | ^ - 39 | }); - 40 | - 41 | test('returned promise rejection', () => Promise.reject(deepObject)); + 576 | actual: '', + 577 | message: message, + > 578 | error: checkIsError ? error : new Error(message) + | ^ + 579 | }); + 580 | }; + 581 | } at __tests__/during_tests.test.js:38:3 ● returned promise rejection @@ -129,14 +129,16 @@ "tooDeep": [Object], }, ], } - 39 | }); - 40 | - > 41 | test('returned promise rejection', () => Promise.reject(deepObject)); - | ^ - 42 | + 107 | } + 108 | + > 109 | const extraError = new Error(); + | ^ + 110 | + 111 | // Without this line v8 stores references to all closures + 112 | // in the stack in the Error object. This line stringifies the stack at __tests__/during_tests.test.js:41:1 " 34 | expect(cleanStderr(stderr)).toMatchSnapshot(); 35 | stderr = runJest(dir, ['during_tests.test.js']).stderr; > 36 | expect(cleanStderr(stderr)).toMatchSnapshot(); | ^ 37 | }); 38 | 39 | test('works with node assert', () => { at Object.toMatchSnapshot (e2e/__tests__/failures.test.js:36:31) ● works with async failures expect(value).toMatchSnapshot() Received value does not match stored snapshot "works with async failures 1". - Snapshot + Received @@ -22,17 +22,17 @@ Object { - "baz": "bar", + "foo": "bar", } - 10 | - 11 | test('resolve, but fail', () => - > 12 | expect(Promise.resolve({foo: 'bar'})).resolves.toEqual({baz: 'bar'})); - | ^ - 13 | - 14 | test('reject, but fail', () => - 15 | expect(Promise.reject({foo: 'bar'})).rejects.toEqual({baz: 'bar'})); + 171 | } + 172 | + > 173 | const innerErr = new JestAssertionError(); + | ^ + 174 | + 175 | return actual.then( + 176 | result => at __tests__/async_failures.test.js:12:50 ● reject, but fail @@ -51,64 +51,64 @@ Object { - "baz": "bar", + "foo": "bar", } - 13 | - 14 | test('reject, but fail', () => - > 15 | expect(Promise.reject({foo: 'bar'})).rejects.toEqual({baz: 'bar'})); - | ^ - 16 | - 17 | test('expect reject', () => - 18 | expect(Promise.resolve({foo: 'bar'})).rejects.toEqual({foo: 'bar'})); + 216 | } + 217 | + > 218 | const innerErr = new JestAssertionError(); + | ^ + 219 | + 220 | return actual.then( + 221 | result => { at __tests__/async_failures.test.js:15:48 ● expect reject expect(received).rejects.toEqual() Expected received Promise to reject, instead it resolved to value {"foo": "bar"} - 16 | - 17 | test('expect reject', () => - > 18 | expect(Promise.resolve({foo: 'bar'})).rejects.toEqual({foo: 'bar'})); - | ^ - 19 | - 20 | test('expect resolve', () => - 21 | expect(Promise.reject({foo: 'bar'})).resolves.toEqual({foo: 'bar'})); + 99 | }; + 100 | + > 101 | const err = new JestAssertionError(); + | ^ + 102 | + 103 | Object.keys(allMatchers).forEach(name => { + 104 | const matcher = allMatchers[name]; at __tests__/async_failures.test.js:18:3 ● expect resolve expect(received).resolves.toEqual() Expected received Promise to resolve, instead it rejected to value {"foo": "bar"} - 19 | - 20 | test('expect resolve', () => - > 21 | expect(Promise.reject({foo: 'bar'})).resolves.toEqual({foo: 'bar'})); - | ^ - 22 | - 23 | test( - 24 | 'timeout', + 99 | }; + 100 | + > 101 | const err = new JestAssertionError(); + | ^ + 102 | + 103 | Object.keys(allMatchers).forEach(name => { + 104 | const matcher = allMatchers[name]; at __tests__/async_failures.test.js:21:3 ● timeout - 21 | expect(Promise.reject({foo: 'bar'})).resolves.toEqual({foo: 'bar'})); - 22 | - > 23 | test( - | ^ - 24 | 'timeout', - 25 | done => { - 26 | setTimeout(done, 50); + 83 | this.throwOnExpectationFailure = !!attrs.throwOnExpectationFailure; + 84 | + > 85 | this.initError = new Error(); + | ^ + 86 | this.initError.name = ''; + 87 | + 88 | // Without this line v8 stores references to all closures at __tests__/async_failures.test.js:23:1 " 162 | .replace(/.*Timeout - Async callback was not.*/, ''); 163 | > 164 | expect(result).toMatchSnapshot(); | ^ 165 | }); 166 | 167 | test('works with snapshot failures', () => { at Object.toMatchSnapshot (e2e/__tests__/failures.test.js:164:18) FAIL e2e/__tests__/to_throw_error_matching_inline_snapshot.test.js (18.872s) ● works fine when function throws error expect(received).toMatch(expected) Expected value to match: "1 snapshot written from 1 test suite." Received: "FAIL __tests__/works-fine-when-function-throws-error.test.js ● Test suite failed to run Jest: Couldn't locate all inline snapshots. 198 | 199 | if (remainingSnapshots.size) { > 200 | throw new Error(`Jest: Couldn't locate all inline snapshots.`); | ^ 201 | } 202 | 203 | return ast; at Object.parse (../../packages/jest-snapshot/build/inline_snapshots.js:200:11) Test Suites: 1 failed, 1 total Tests: 0 total Snapshots: 0 total Time: 3.286s Ran all test suites matching /works-fine-when-function-throws-error.test.js/i. " 37 | const {stderr, status} = runJest(DIR, ['-w=1', '--ci=false', filename]); 38 | const fileAfter = readFile(filename); > 39 | expect(stderr).toMatch('1 snapshot written from 1 test suite.'); | ^ 40 | expect(fileAfter).toMatchSnapshot('initial write'); 41 | expect(status).toBe(0); 42 | } at Object.toMatch (e2e/__tests__/to_throw_error_matching_inline_snapshot.test.js:39:20) ● updates existing snapshot expect(received).toMatch(expected) Expected value to match: "1 snapshot updated from 1 test suite." Received: "FAIL __tests__/updates-existing-snapshot.test.js ● Test suite failed to run Jest: Couldn't locate all inline snapshots. 198 | 199 | if (remainingSnapshots.size) { > 200 | throw new Error(`Jest: Couldn't locate all inline snapshots.`); | ^ 201 | } 202 | 203 | return ast; at Object.parse (../../packages/jest-snapshot/build/inline_snapshots.js:200:11) Test Suites: 1 failed, 1 total Tests: 0 total Snapshots: 0 total Time: 3.539s Ran all test suites matching /updates-existing-snapshot.test.js/i. " 63 | ]); 64 | const fileAfter = readFile(filename); > 65 | expect(stderr).toMatch('1 snapshot updated from 1 test suite.'); | ^ 66 | expect(fileAfter).toMatchSnapshot('updated snapshot'); 67 | expect(status).toBe(0); 68 | } at Object.toMatch (e2e/__tests__/to_throw_error_matching_inline_snapshot.test.js:65:20) ● should support rejecting promises expect(received).toMatch(expected) Expected value to match: "1 snapshot written from 1 test suite." Received: "FAIL __tests__/should-support-rejecting-promises.test.js ● Test suite failed to run Jest: Couldn't locate all inline snapshots. 198 | 199 | if (remainingSnapshots.size) { > 200 | throw new Error(`Jest: Couldn't locate all inline snapshots.`); | ^ 201 | } 202 | 203 | return ast; at Object.parse (../../packages/jest-snapshot/build/inline_snapshots.js:200:11) Test Suites: 1 failed, 1 total Tests: 0 total Snapshots: 0 total Time: 3.225s Ran all test suites matching /should-support-rejecting-promises.test.js/i. " 99 | const {stderr, status} = runJest(DIR, ['-w=1', '--ci=false', filename]); 100 | const fileAfter = readFile(filename); > 101 | expect(stderr).toMatch('1 snapshot written from 1 test suite.'); | ^ 102 | expect(fileAfter).toMatchSnapshot(); 103 | expect(status).toBe(0); 104 | }); at Object.toMatch (e2e/__tests__/to_throw_error_matching_inline_snapshot.test.js:101:18) FAIL e2e/__tests__/watch_mode_patterns.test.js (16.809s) ● can press "p" to filter by file name expect(value).toMatchSnapshot() Received value does not match stored snapshot "can press "p" to filter by file name 1". - Snapshot + Received + " Pattern Mode Usage › Press Esc to exit pattern mode. › Press Enter to filter by a filenames regex pattern. - pattern › - pattern › b - pattern › ba - pattern › bar + pattern › pattern › b pattern › ba pattern › bar + + " 54 | const results = extractSummaries(stderr); 55 | > 56 | expect(stdout).toMatchSnapshot(); | ^ 57 | expect(results).toHaveLength(2); 58 | results.forEach(({rest, summary}) => { 59 | expect(rest).toMatchSnapshot('test results'); at Object.toMatchSnapshot (e2e/__tests__/watch_mode_patterns.test.js:56:18) ● can press "t" to filter by test name expect(value).toMatchSnapshot() Received value does not match stored snapshot "can press "t" to filter by test name 1". - Snapshot + Received + " Pattern Mode Usage › Press Esc to exit pattern mode. › Press Enter to filter by a tests regex pattern. - pattern › - pattern › 2 + pattern › pattern › 2 + + " 73 | const results = extractSummaries(stderr); 74 | > 75 | expect(stdout).toMatchSnapshot(); | ^ 76 | expect(results).toHaveLength(2); 77 | results.forEach(({rest, summary}) => { 78 | expect(rest).toMatchSnapshot('test results'); at Object.toMatchSnapshot (e2e/__tests__/watch_mode_patterns.test.js:75:18) FAIL e2e/__tests__/show_config.test.js ● --showConfig outputs config info and exits expect(value).toMatchSnapshot() Received value does not match stored snapshot "--showConfig outputs config info and exits 1". - Snapshot + Received @@ -54,17 +54,17 @@ ], "testPathIgnorePatterns": [ "/node_modules/" ], "testRegex": [], - "testRunner": "<>/jest-jasmine2/build/index.js", + "testRunner": "/Users/asp/GitHub/jest-2/packages/jest-jasmine2/build/index.js", "testURL": "http://localhost", "timers": "real", "transform": [ [ "^.+\\\\.jsx?$", - "<>/babel-jest/build/index.js" + "/Users/asp/GitHub/jest-2/packages/babel-jest/build/index.js" ] ], "transformIgnorePatterns": [ "/node_modules/" ], 44 | .replace(/\"\S*\/jest\/packages/gm, '"<>'); 45 | > 46 | expect(stdout).toMatchSnapshot(); | ^ 47 | }); 48 | at Object.toMatchSnapshot (e2e/__tests__/show_config.test.js:46:18) FAIL e2e/__tests__/resolve_no_file_extensions.test.js (6.929s) ● show error message with matching files expect(value).toMatchSnapshot() Received value does not match stored snapshot "show error message with matching files 1". - Snapshot + Received @@ -8,15 +8,17 @@ You might want to include a file extension in your import, or update your 'moduleFileExtensions', which is currently ['js']. See https://jestjs.io/docs/en/configuration#modulefileextensions-array-string - 1 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. - 2 | - > 3 | module.exports = require('./some-json-file'); - | ^ - 4 | + 222 | from + 223 | ); + > 224 | const err = new Error( + | ^ + 225 | `Cannot find module '${moduleName}' from '${relativePath || '.'}'` + 226 | ); + 227 | err.code = 'MODULE_NOT_FOUND'; at packages/jest-resolve/build/index.js:224:17 at index.js:3:18 " 23 | 24 | expect(status).toBe(1); > 25 | expect(rest).toMatchSnapshot(); | ^ 26 | }); 27 | 28 | test('show error message when no js moduleFileExtensions', () => { at Object.toMatchSnapshot (e2e/__tests__/resolve_no_file_extensions.test.js:25:16) FAIL e2e/__tests__/expect-async-matcher.test.js (7.842s) ● shows the correct errors in stderr when failing tests expect(value).toMatchSnapshot() Received value does not match stored snapshot "shows the correct errors in stderr when failing tests 1". - Snapshot + Received @@ -33,17 +33,17 @@ Received: 1 received.length: 1 - 22 | - 23 | it('fail with expected promise values', async () => { - > 24 | await (expect(Promise.resolve([1])): any).resolves.toHaveLengthAsync( - | ^ - 25 | Promise.resolve(2) - 26 | ); - 27 | }); + 171 | } + 172 | + > 173 | const innerErr = new JestAssertionError(); + | ^ + 174 | + 175 | return actual.then( + 176 | result => at __tests__/failure.test.js:24:54 at __tests__/failure.test.js:11:191 at __tests__/failure.test.js:11:437 at __tests__/failure.test.js:11:99 @@ -55,17 +55,17 @@ Received: 1,2 received.length: 2 - 28 | - 29 | it('fail with expected promise values and not', async () => { - > 30 | await (expect(Promise.resolve([1, 2])).resolves.not: any).toHaveLengthAsync( - | ^ - 31 | Promise.resolve(2) - 32 | ); - 33 | }); + 171 | } + 172 | + > 173 | const innerErr = new JestAssertionError(); + | ^ + 174 | + 175 | return actual.then( + 176 | result => at __tests__/failure.test.js:30:61 at __tests__/failure.test.js:11:191 at __tests__/failure.test.js:11:437 at __tests__/failure.test.js:11:99 30 | .join('\n'); 31 | > 32 | expect(rest).toMatchSnapshot(); | ^ 33 | }); 34 | at Object.toMatchSnapshot (e2e/__tests__/expect-async-matcher.test.js:32:16) FAIL e2e/__tests__/module_name_mapper.test.js (11.649s) ● moduleNameMapper wrong configuration expect(value).toMatchSnapshot() Received value does not match stored snapshot "moduleNameMapper wrong configuration 1". - Snapshot + Received @@ -12,17 +12,17 @@ "/\\.(css|less)$/": "no-such-module" }, "resolver": null } - 8 | 'use strict'; - 9 | - > 10 | require('./style.css'); - | ^ - 11 | - 12 | module.exports = () => 'test'; - 13 | + 408 | resolver + 409 | ) => { + > 410 | const error = new Error( + | ^ + 411 | (_chalk || _load_chalk()).default.red(`${( + 412 | _chalk || _load_chalk() + 413 | ).default.bold('Configuration error')}: at packages/jest-resolve/build/index.js:410:17 at index.js:10:1 " 17 | 18 | expect(status).toBe(1); > 19 | expect(rest).toMatchSnapshot(); | ^ 20 | }); 21 | 22 | test('moduleNameMapper correct configuration', () => { at Object.toMatchSnapshot (e2e/__tests__/module_name_mapper.test.js:19:16) FAIL examples/manual-mocks/__tests__/lodashMocking.test.js ● if lodash head is mocked expect(received).toEqual(expected) Expected value to equal: 5 Received: 2 4 | 5 | test('if lodash head is mocked', () => { > 6 | expect(lodash.head([2, 3])).toEqual(5); | ^ 7 | }); 8 | at Object.toEqual (__tests__/lodashMocking.test.js:6:31) Snapshot Summary › 11 snapshots failed from 7 test suites. Inspect your code changes or run `yarn run jest -u` to update them. › 12 snapshots obsolete from 2 test suites. To remove them all, run `yarn run jest -u`. ↳ e2e/__tests__/to_match_inline_snapshot.test.js • basic support: initial write 1 • basic support: snapshot mismatch 1 • basic support: snapshot passed 1 • basic support: snapshot updated 1 • handles property matchers: initial write 1 • handles property matchers: snapshot failed 1 • handles property matchers: snapshot passed 1 • handles property matchers: snapshot updated 1 • removes obsolete external snapshots: external snapshot cleaned 1 • removes obsolete external snapshots: inline snapshot written 1 ↳ e2e/__tests__/to_throw_error_matching_inline_snapshot.test.js • updates existing snapshot: updated snapshot 1 • works fine when function throws error: initial write 1 Test Suites: 10 failed, 285 passed, 295 total Tests: 22 failed, 7 skipped, 2937 passed, 2966 total Snapshots: 11 failed, 12 obsolete, 1223 passed, 1234 total Time: 682.015s Ran all test suites in 14 projects. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.