From aa072a7e5b093d62fb8d5bf14119eacf87ac52ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Wed, 2 Aug 2017 19:11:32 +0200 Subject: [PATCH] Don't wrap multiline strings with double quotes --- .../__snapshots__/console.test.js.snap | 28 +- ...e_log_output_when_run_in_band.test.js.snap | 12 +- .../coverage_report.test.js.snap | 16 +- .../coverage_threshold.test.js.snap | 4 +- .../custom_reporters.test.js.snap | 52 +- .../__snapshots__/failures.test.js.snap | 62 +- .../__snapshots__/globals.test.js.snap | 56 +- .../__snapshots__/jest.config.js.test.js.snap | 20 +- .../module_name_mapper.test.js.snap | 12 +- .../multi_project_runner.test.js.snap | 20 +- .../__snapshots__/show_config.test.js.snap | 136 +- .../__snapshots__/snapshot.test.js.snap | 68 +- .../snapshot_serializers.test.js.snap | 24 +- .../__snapshots__/stack_trace.test.js.snap | 28 +- .../test_name_pattern.test.js.snap | 6 +- .../__snapshots__/timeouts.test.js.snap | 12 +- .../__snapshots__/transform.test.js.snap | 12 +- .../typescript_coverage.test.js.snap | 4 +- .../__snapshots__/watch.test.js.snap | 4 +- .../watch_filename_pattern_mode.test.js.snap | 68 +- .../watch_test_name_pattern_mode.test.js.snap | 44 +- .../log_debug_messages.test.js.snap | 50 +- .../__snapshots__/utils.test.js.snap | 8 +- .../__snapshots__/normalize.test.js.snap | 82 +- .../__tests__/__snapshots__/diff.test.js.snap | 50 +- .../__snapshots__/index.test.js.snap | 20 +- .../__snapshots__/matchers.test.js.snap | 4 +- .../__snapshots__/index.test.js.snap | 14 +- .../__snapshots__/matchers.test.js.snap | 1824 ++++++++--------- .../__snapshots__/spy_matchers.test.js.snap | 218 +- .../to_throw_matchers.test.js.snap | 140 +- .../__snapshots__/messages.test.js.snap | 12 +- .../script_transformer.test.js.snap | 36 +- .../jest-snapshot/src/__tests__/utils.test.js | 2 +- .../__snapshots__/fake_timers.test.js.snap | 4 +- .../validate_cli_options.test.js.snap | 30 +- .../__snapshots__/validate.test.js.snap | 210 +- .../__snapshots__/react.test.js.snap | 20 +- .../src/__tests__/pretty_format.test.js | 6 +- .../pretty-format/src/__tests__/react.test.js | 4 +- packages/pretty-format/src/index.js | 18 +- 41 files changed, 1725 insertions(+), 1715 deletions(-) diff --git a/integration_tests/__tests__/__snapshots__/console.test.js.snap b/integration_tests/__tests__/__snapshots__/console.test.js.snap index ec173b3fb720..6f20d5b90400 100644 --- a/integration_tests/__tests__/__snapshots__/console.test.js.snap +++ b/integration_tests/__tests__/__snapshots__/console.test.js.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`console printing 1`] = ` -" PASS __tests__/console.test.js + PASS __tests__/console.test.js ● Console console.log __tests__/console.test.js:11 @@ -14,20 +14,20 @@ exports[`console printing 1`] = ` This is an error message. -" + `; exports[`console printing 2`] = ` -"Test Suites: 1 passed, 1 total +Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <> Ran all test suites. -" + `; exports[`console printing with --verbose 1`] = ` -" console.log __tests__/console.test.js:11 + console.log __tests__/console.test.js:11 This is a log message. console.info __tests__/console.test.js:13 @@ -39,37 +39,37 @@ exports[`console printing with --verbose 1`] = ` console.error __tests__/console.test.js:17 This is an error message. -" + `; exports[`console printing with --verbose 2`] = ` -" PASS __tests__/console.test.js + PASS __tests__/console.test.js ✓ works just fine -" + `; exports[`console printing with --verbose 3`] = ` -"Test Suites: 1 passed, 1 total +Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <> Ran all test suites. -" + `; exports[`does not print to console with --silent 1`] = `""`; exports[`does not print to console with --silent 2`] = ` -" PASS __tests__/console.test.js + PASS __tests__/console.test.js + -" `; exports[`does not print to console with --silent 3`] = ` -"Test Suites: 1 passed, 1 total +Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <> -" + `; diff --git a/integration_tests/__tests__/__snapshots__/console_log_output_when_run_in_band.test.js.snap b/integration_tests/__tests__/__snapshots__/console_log_output_when_run_in_band.test.js.snap index 2d8e865a6cc6..21064037df0c 100644 --- a/integration_tests/__tests__/__snapshots__/console_log_output_when_run_in_band.test.js.snap +++ b/integration_tests/__tests__/__snapshots__/console_log_output_when_run_in_band.test.js.snap @@ -1,24 +1,24 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`prints console.logs when run with forceExit 1`] = ` -" PASS __tests__/a-banana.js + PASS __tests__/a-banana.js ✓ banana -" + `; exports[`prints console.logs when run with forceExit 2`] = ` -"Test Suites: 1 passed, 1 total +Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <> Ran all test suites. -" + `; exports[`prints console.logs when run with forceExit 3`] = ` -" console.log __tests__/a-banana.js:2 + console.log __tests__/a-banana.js:2 Hey -" + `; diff --git a/integration_tests/__tests__/__snapshots__/coverage_report.test.js.snap b/integration_tests/__tests__/__snapshots__/coverage_report.test.js.snap index 8d542645ef81..459630ad8fe1 100644 --- a/integration_tests/__tests__/__snapshots__/coverage_report.test.js.snap +++ b/integration_tests/__tests__/__snapshots__/coverage_report.test.js.snap @@ -1,36 +1,36 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`collects coverage only from specified files 1`] = ` -"----------|----------|----------|----------|----------|----------------| +----------|----------|----------|----------|----------|----------------| File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines | ----------|----------|----------|----------|----------|----------------| All files | 100 | 100 | 100 | 100 | | setup.js | 100 | 100 | 100 | 100 | | ----------|----------|----------|----------|----------|----------------| -" + `; exports[`collects coverage only from specified files avoiding dependencies 1`] = ` -"----------|----------|----------|----------|----------|----------------| +----------|----------|----------|----------|----------|----------------| File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines | ----------|----------|----------|----------|----------|----------------| All files | 85.71 | 100 | 50 | 85.71 | | sum.js | 85.71 | 100 | 50 | 85.71 | 13 | ----------|----------|----------|----------|----------|----------------| -" + `; exports[`json reporter printing with --coverage 1`] = ` -"Test Suites: 1 failed, 1 total +Test Suites: 1 failed, 1 total Tests: 1 failed, 1 passed, 2 total Snapshots: 0 total Time: <> Ran all test suites. -" + `; exports[`outputs coverage report 1`] = ` -"-------------------------------|----------|----------|----------|----------|----------------| +-------------------------------|----------|----------|----------|----------|----------------| File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines | -------------------------------|----------|----------|----------|----------|----------------| All files | 41.18 | 0 | 25 | 41.18 | | @@ -39,5 +39,5 @@ All files | 41.18 | 0 | 25 | 41.18 | sum.js | 85.71 | 100 | 50 | 85.71 | 13 | sum_dependency.js | 0 | 0 | 0 | 0 | 9,11,12,15 | -------------------------------|----------|----------|----------|----------|----------------| -" + `; diff --git a/integration_tests/__tests__/__snapshots__/coverage_threshold.test.js.snap b/integration_tests/__tests__/__snapshots__/coverage_threshold.test.js.snap index 62d13915a7de..47b011e861b2 100644 --- a/integration_tests/__tests__/__snapshots__/coverage_threshold.test.js.snap +++ b/integration_tests/__tests__/__snapshots__/coverage_threshold.test.js.snap @@ -1,11 +1,11 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`exits with 1 if coverage threshold is not met 1`] = ` -"----------------|----------|----------|----------|----------|----------------| +----------------|----------|----------|----------|----------|----------------| File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines | ----------------|----------|----------|----------|----------|----------------| All files | 50 | 100 | 0 | 50 | | not-covered.js | 50 | 100 | 0 | 50 | 3 | ----------------|----------|----------|----------|----------|----------------| -" + `; diff --git a/integration_tests/__tests__/__snapshots__/custom_reporters.test.js.snap b/integration_tests/__tests__/__snapshots__/custom_reporters.test.js.snap index 438c382f298c..617e334dce3d 100644 --- a/integration_tests/__tests__/__snapshots__/custom_reporters.test.js.snap +++ b/integration_tests/__tests__/__snapshots__/custom_reporters.test.js.snap @@ -1,11 +1,11 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Custom Reporters Integration IncompleteReporter for flexibility 1`] = ` -"onRunComplete is called +onRunComplete is called Passed Tests: 1 Failed Tests: 0 Total Tests: 1 -" + `; exports[`Custom Reporters Integration TestReporter with all tests failing 1`] = ` @@ -65,20 +65,20 @@ Object { `; exports[`Custom Reporters Integration default reporters enabled 1`] = ` -" PASS __tests__/add.test.js + PASS __tests__/add.test.js Custom Reporters ✓ adds ok -" + `; exports[`Custom Reporters Integration default reporters enabled 2`] = ` -"Test Suites: 1 passed, 1 total +Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <> Ran all test suites matching /add.test.js/i. -" + `; exports[`Custom Reporters Integration default reporters enabled 3`] = ` @@ -106,7 +106,7 @@ Object { `; exports[`Custom Reporters Integration invalid format for adding reporters 1`] = ` -"● Reporter Validation Error: +● Reporter Validation Error: Unexpected value for Path at index 0 of reporter at index 0 Expected: @@ -121,31 +121,31 @@ exports[`Custom Reporters Integration invalid format for adding reporters 1`] = Configuration Documentation: https://facebook.github.io/jest/docs/configuration.html -" + `; exports[`Custom Reporters Integration valid array format for adding reporters 1`] = ` -"{ - \\"onRunComplete\\": { - \\"called\\": true, - \\"numPassedTests\\": 1, - \\"numFailedTests\\": 0, - \\"numTotalTests\\": 1 +{ + "onRunComplete": { + "called": true, + "numPassedTests": 1, + "numFailedTests": 0, + "numTotalTests": 1 }, - \\"onRunStart\\": { - \\"called\\": true, - \\"options\\": \\"object\\" + "onRunStart": { + "called": true, + "options": "object" }, - \\"onTestResult\\": { - \\"times\\": 1, - \\"called\\": true + "onTestResult": { + "times": 1, + "called": true }, - \\"onTestStart\\": { - \\"called\\": true, - \\"path\\": false + "onTestStart": { + "called": true, + "path": false }, - \\"options\\": { - \\"Dmitrii Abramov\\": \\"Awesome\\" + "options": { + "Dmitrii Abramov": "Awesome" } -}" +} `; diff --git a/integration_tests/__tests__/__snapshots__/failures.test.js.snap b/integration_tests/__tests__/__snapshots__/failures.test.js.snap index 98e588e7107f..eec1cecda64c 100644 --- a/integration_tests/__tests__/__snapshots__/failures.test.js.snap +++ b/integration_tests/__tests__/__snapshots__/failures.test.js.snap @@ -1,35 +1,35 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`not throwing Error objects 1`] = ` -" FAIL __tests__/throw_number.test.js + FAIL __tests__/throw_number.test.js ● Test suite failed to run - Expected an Error, but \\"1\\" was thrown + Expected an Error, but "1" was thrown + -" `; exports[`not throwing Error objects 2`] = ` -" FAIL __tests__/throw_string.test.js + FAIL __tests__/throw_string.test.js ● Test suite failed to run Error banana -" + `; exports[`not throwing Error objects 3`] = ` -" FAIL __tests__/throw_object.test.js + FAIL __tests__/throw_object.test.js ● Test suite failed to run Error: No message was provided -" + `; exports[`not throwing Error objects 4`] = ` -" FAIL __tests__/assertion_count.test.js + FAIL __tests__/assertion_count.test.js ● .assertions() › throws expect(received).toBeTruthy() Expected value to be truthy, instead received @@ -55,11 +55,11 @@ exports[`not throwing Error objects 4`] = ` ✕ throws on assertion .hasAssertions() ✕ throws when there are not assertions -" + `; exports[`works with node assert 1`] = ` -" FAIL __tests__/node_assertion_error.test.js + FAIL __tests__/node_assertion_error.test.js ● assert assert.equal(received, expected) or assert(received) @@ -141,9 +141,9 @@ exports[`works with node assert 1`] = ` assert.deepEqual(received, expected) Expected value to deeply equal to: - {\\"a\\": {\\"b\\": {\\"c\\": 6}}} + {"a": {"b": {"c": 6}}} Received: - {\\"a\\": {\\"b\\": {\\"c\\": 5}}} + {"a": {"b": {"c": 5}}} Difference: @@ -151,10 +151,10 @@ exports[`works with node assert 1`] = ` + Received Object { - \\"a\\": Object { - \\"b\\": Object { - - \\"c\\": 6, - + \\"c\\": 5, + "a": Object { + "b": Object { + - "c": 6, + + "c": 5, }, }, } @@ -166,9 +166,9 @@ exports[`works with node assert 1`] = ` assert.deepEqual(received, expected) Expected value to deeply equal to: - {\\"a\\": {\\"b\\": {\\"c\\": 7}}} + {"a": {"b": {"c": 7}}} Received: - {\\"a\\": {\\"b\\": {\\"c\\": 5}}} + {"a": {"b": {"c": 5}}} Message: this is a message @@ -179,10 +179,10 @@ exports[`works with node assert 1`] = ` + Received Object { - \\"a\\": Object { - \\"b\\": Object { - - \\"c\\": 7, - + \\"c\\": 5, + "a": Object { + "b": Object { + - "c": 7, + + "c": 5, }, }, } @@ -194,9 +194,9 @@ exports[`works with node assert 1`] = ` assert.notDeepEqual(received, expected) Expected value not to deeply equal to: - {\\"a\\": 1} + {"a": 1} Received: - {\\"a\\": 1} + {"a": 1} Difference: @@ -238,9 +238,9 @@ exports[`works with node assert 1`] = ` assert.deepStrictEqual(received, expected) Expected value to deeply and strictly equal to: - {\\"a\\": 2} + {"a": 2} Received: - {\\"a\\": 1} + {"a": 1} Difference: @@ -248,8 +248,8 @@ exports[`works with node assert 1`] = ` + Received Object { - - \\"a\\": 2, - + \\"a\\": 1, + - "a": 2, + + "a": 1, } at __tests__/node_assertion_error.test.js:60:10 @@ -259,9 +259,9 @@ exports[`works with node assert 1`] = ` assert.notDeepStrictEqual(received, expected) Expected value not to deeply and strictly equal to: - {\\"a\\": 1} + {"a": 1} Received: - {\\"a\\": 1} + {"a": 1} Difference: @@ -316,5 +316,5 @@ exports[`works with node assert 1`] = ` ✕ assert.doesNotThrow ✕ assert.throws -" + `; diff --git a/integration_tests/__tests__/__snapshots__/globals.test.js.snap b/integration_tests/__tests__/__snapshots__/globals.test.js.snap index b40dfdc8f509..eb11d5353d19 100644 --- a/integration_tests/__tests__/__snapshots__/globals.test.js.snap +++ b/integration_tests/__tests__/__snapshots__/globals.test.js.snap @@ -1,27 +1,27 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`basic test constructs 1`] = ` -" PASS __tests__/basic.test-constructs.test.js + PASS __tests__/basic.test-constructs.test.js ✓ it ✓ test describe ✓ it ✓ test -" + `; exports[`basic test constructs 2`] = ` -"Test Suites: 1 passed, 1 total +Test Suites: 1 passed, 1 total Tests: 4 passed, 4 total Snapshots: 0 total Time: <> Ran all test suites. -" + `; exports[`only 1`] = ` -" PASS __tests__/only-constructs.test.js + PASS __tests__/only-constructs.test.js ✓ test.only ✓ it.only ✓ fit @@ -34,20 +34,20 @@ exports[`only 1`] = ` describe ✓ test -" + `; exports[`only 2`] = ` -"Test Suites: 1 passed, 1 total +Test Suites: 1 passed, 1 total Tests: 1 skipped, 7 passed, 8 total Snapshots: 0 total Time: <> Ran all test suites. -" + `; exports[`only with expand arg 1`] = ` -" PASS __tests__/only-constructs.test.js + PASS __tests__/only-constructs.test.js ○ it ✓ test.only ✓ it.only @@ -60,20 +60,20 @@ exports[`only with expand arg 1`] = ` describe ✓ test -" + `; exports[`only with expand arg 2`] = ` -"Test Suites: 1 passed, 1 total +Test Suites: 1 passed, 1 total Tests: 1 skipped, 7 passed, 8 total Snapshots: 0 total Time: <> Ran all test suites. -" + `; exports[`skips 1`] = ` -" PASS __tests__/skips-constructs.test.js + PASS __tests__/skips-constructs.test.js ✓ it ○ skipped 4 tests xdescribe @@ -83,20 +83,20 @@ exports[`skips 1`] = ` describe ○ skipped 1 test -" + `; exports[`skips 2`] = ` -"Test Suites: 1 passed, 1 total +Test Suites: 1 passed, 1 total Tests: 8 skipped, 1 passed, 9 total Snapshots: 0 total Time: <> Ran all test suites. -" + `; exports[`skips with expand arg 1`] = ` -" PASS __tests__/skips-constructs.test.js + PASS __tests__/skips-constructs.test.js ✓ it ○ xtest ○ xit @@ -110,49 +110,49 @@ exports[`skips with expand arg 1`] = ` describe ○ test -" + `; exports[`skips with expand arg 2`] = ` -"Test Suites: 1 passed, 1 total +Test Suites: 1 passed, 1 total Tests: 8 skipped, 1 passed, 9 total Snapshots: 0 total Time: <> Ran all test suites. -" + `; exports[`tests with no implementation 1`] = ` -" PASS __tests__/only-constructs.test.js + PASS __tests__/only-constructs.test.js ✓ it ○ skipped 2 tests -" + `; exports[`tests with no implementation 2`] = ` -"Test Suites: 1 passed, 1 total +Test Suites: 1 passed, 1 total Tests: 2 skipped, 1 passed, 3 total Snapshots: 0 total Time: <> Ran all test suites. -" + `; exports[`tests with no implementation with expand arg 1`] = ` -" PASS __tests__/only-constructs.test.js + PASS __tests__/only-constructs.test.js ✓ it ○ it, no implementation ○ test, no implementation -" + `; exports[`tests with no implementation with expand arg 2`] = ` -"Test Suites: 1 passed, 1 total +Test Suites: 1 passed, 1 total Tests: 2 skipped, 1 passed, 3 total Snapshots: 0 total Time: <> Ran all test suites. -" + `; diff --git a/integration_tests/__tests__/__snapshots__/jest.config.js.test.js.snap b/integration_tests/__tests__/__snapshots__/jest.config.js.test.js.snap index 0bfe348ef455..fcaf17441623 100644 --- a/integration_tests/__tests__/__snapshots__/jest.config.js.test.js.snap +++ b/integration_tests/__tests__/__snapshots__/jest.config.js.test.js.snap @@ -1,41 +1,41 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`traverses directory tree up until it finds jest.config 1`] = ` -" console.log ../../../__tests__/a-banana.js:3 + console.log ../../../__tests__/a-banana.js:3 <>/jest.config.js/some/nested/directory -" + `; exports[`traverses directory tree up until it finds jest.config 2`] = ` -" PASS ../../../__tests__/a-banana.js + PASS ../../../__tests__/a-banana.js ✓ banana ✓ abc -" + `; exports[`traverses directory tree up until it finds jest.config 3`] = ` -"Test Suites: 1 passed, 1 total +Test Suites: 1 passed, 1 total Tests: 2 passed, 2 total Snapshots: 0 total Time: <> Ran all test suites. -" + `; exports[`works with jest.conf.js 1`] = ` -" PASS __tests__/a-banana.js + PASS __tests__/a-banana.js ✓ banana -" + `; exports[`works with jest.conf.js 2`] = ` -"Test Suites: 1 passed, 1 total +Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <> Ran all test suites. -" + `; diff --git a/integration_tests/__tests__/__snapshots__/module_name_mapper.test.js.snap b/integration_tests/__tests__/__snapshots__/module_name_mapper.test.js.snap index d6895f2ed461..caf06812c1ca 100644 --- a/integration_tests/__tests__/__snapshots__/module_name_mapper.test.js.snap +++ b/integration_tests/__tests__/__snapshots__/module_name_mapper.test.js.snap @@ -1,14 +1,14 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`moduleNameMapper correct configuration 1`] = ` -" PASS __tests__/index.js + PASS __tests__/index.js ✓ moduleNameMapping correct configuration -" + `; exports[`moduleNameMapper wrong configuration 1`] = ` -" FAIL __tests__/index.js + FAIL __tests__/index.js ● Test suite failed to run Configuration error: @@ -16,9 +16,9 @@ exports[`moduleNameMapper wrong configuration 1`] = ` Unknown module in configuration option moduleNameMapper Please check: - \\"moduleNameMapper\\": { - \\"/\\\\.(css|less)$/\\": \\"no-such-module\\" + "moduleNameMapper": { + "/\\.(css|less)$/": "no-such-module" } -" + `; diff --git a/integration_tests/__tests__/__snapshots__/multi_project_runner.test.js.snap b/integration_tests/__tests__/__snapshots__/multi_project_runner.test.js.snap index e843354d2ac5..3acf9bad9996 100644 --- a/integration_tests/__tests__/__snapshots__/multi_project_runner.test.js.snap +++ b/integration_tests/__tests__/__snapshots__/multi_project_runner.test.js.snap @@ -1,38 +1,38 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`can pass projects or global config 1`] = ` -"Test Suites: 2 failed, 2 total +Test Suites: 2 failed, 2 total Tests: 0 total Snapshots: 0 total Time: <> Ran all test suites. -" + `; exports[`can pass projects or global config 2`] = ` -"Test Suites: 2 passed, 2 total +Test Suites: 2 passed, 2 total Tests: 2 passed, 2 total Snapshots: 0 total Time: <> Ran all test suites in 2 projects. -" + `; exports[`can pass projects or global config 3`] = ` -"PASS project1/__tests__/file1.test.js -PASS project2/__tests__/file1.test.js" +PASS project1/__tests__/file1.test.js +PASS project2/__tests__/file1.test.js `; exports[`can pass projects or global config 4`] = ` -"Test Suites: 2 passed, 2 total +Test Suites: 2 passed, 2 total Tests: 2 passed, 2 total Snapshots: 0 total Time: <> Ran all test suites in 2 projects. -" + `; exports[`can pass projects or global config 5`] = ` -"PASS project1/__tests__/file1.test.js -PASS project2/__tests__/file1.test.js" +PASS project1/__tests__/file1.test.js +PASS project2/__tests__/file1.test.js `; diff --git a/integration_tests/__tests__/__snapshots__/show_config.test.js.snap b/integration_tests/__tests__/__snapshots__/show_config.test.js.snap index 57e9f0d32837..eea85028ea60 100644 --- a/integration_tests/__tests__/__snapshots__/show_config.test.js.snap +++ b/integration_tests/__tests__/__snapshots__/show_config.test.js.snap @@ -1,86 +1,86 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`--showConfig outputs config info and exits 1`] = ` -"{ - \\"configs\\": [ +{ + "configs": [ { - \\"automock\\": false, - \\"browser\\": false, - \\"cache\\": false, - \\"cacheDirectory\\": \\"/tmp/jest\\", - \\"clearMocks\\": false, - \\"coveragePathIgnorePatterns\\": [ - \\"/node_modules/\\" + "automock": false, + "browser": false, + "cache": false, + "cacheDirectory": "/tmp/jest", + "clearMocks": false, + "coveragePathIgnorePatterns": [ + "/node_modules/" ], - \\"globals\\": {}, - \\"haste\\": { - \\"providesModuleNodeModules\\": [] + "globals": {}, + "haste": { + "providesModuleNodeModules": [] }, - \\"moduleDirectories\\": [ - \\"node_modules\\" + "moduleDirectories": [ + "node_modules" ], - \\"moduleFileExtensions\\": [ - \\"js\\", - \\"json\\", - \\"jsx\\", - \\"node\\" + "moduleFileExtensions": [ + "js", + "json", + "jsx", + "node" ], - \\"moduleNameMapper\\": {}, - \\"modulePathIgnorePatterns\\": [], - \\"name\\": \\"[md5 hash]\\", - \\"resetMocks\\": false, - \\"resetModules\\": false, - \\"rootDir\\": \\"<>\\", - \\"roots\\": [ - \\"<>\\" + "moduleNameMapper": {}, + "modulePathIgnorePatterns": [], + "name": "[md5 hash]", + "resetMocks": false, + "resetModules": false, + "rootDir": "<>", + "roots": [ + "<>" ], - \\"setupFiles\\": [], - \\"snapshotSerializers\\": [], - \\"testEnvironment\\": \\"jest-environment-jsdom\\", - \\"testMatch\\": [ - \\"**/__tests__/**/*.js?(x)\\", - \\"**/?(*.)(spec|test).js?(x)\\" + "setupFiles": [], + "snapshotSerializers": [], + "testEnvironment": "jest-environment-jsdom", + "testMatch": [ + "**/__tests__/**/*.js?(x)", + "**/?(*.)(spec|test).js?(x)" ], - \\"testPathIgnorePatterns\\": [ - \\"/node_modules/\\" + "testPathIgnorePatterns": [ + "/node_modules/" ], - \\"testRegex\\": \\"\\", - \\"testRunner\\": \\"<>/jest-jasmine2/build/index.js\\", - \\"testURL\\": \\"about:blank\\", - \\"timers\\": \\"real\\", - \\"transformIgnorePatterns\\": [ - \\"/node_modules/\\" + "testRegex": "", + "testRunner": "<>/jest-jasmine2/build/index.js", + "testURL": "about:blank", + "timers": "real", + "transformIgnorePatterns": [ + "/node_modules/" ] } ], - \\"globalConfig\\": { - \\"bail\\": false, - \\"changedFilesWithAncestor\\": false, - \\"coverageDirectory\\": \\"<>/coverage\\", - \\"coverageReporters\\": [ - \\"json\\", - \\"text\\", - \\"lcov\\", - \\"clover\\" + "globalConfig": { + "bail": false, + "changedFilesWithAncestor": false, + "coverageDirectory": "<>/coverage", + "coverageReporters": [ + "json", + "text", + "lcov", + "clover" ], - \\"expand\\": false, - \\"listTests\\": false, - \\"mapCoverage\\": false, - \\"maxWorkers\\": \\"[maxWorkers]\\", - \\"noStackTrace\\": false, - \\"nonFlagArgs\\": [], - \\"notify\\": false, - \\"rootDir\\": \\"<>\\", - \\"testFailureExitCode\\": 1, - \\"testPathPattern\\": \\"\\", - \\"testResultsProcessor\\": null, - \\"updateSnapshot\\": \\"all\\", - \\"useStderr\\": false, - \\"verbose\\": null, - \\"watch\\": false, - \\"watchman\\": true + "expand": false, + "listTests": false, + "mapCoverage": false, + "maxWorkers": "[maxWorkers]", + "noStackTrace": false, + "nonFlagArgs": [], + "notify": false, + "rootDir": "<>", + "testFailureExitCode": 1, + "testPathPattern": "", + "testResultsProcessor": null, + "updateSnapshot": "all", + "useStderr": false, + "verbose": null, + "watch": false, + "watchman": true }, - \\"version\\": \\"[version]\\" + "version": "[version]" } -" + `; diff --git a/integration_tests/__tests__/__snapshots__/snapshot.test.js.snap b/integration_tests/__tests__/__snapshots__/snapshot.test.js.snap index e8c366f2407f..0e7b304e806f 100644 --- a/integration_tests/__tests__/__snapshots__/snapshot.test.js.snap +++ b/integration_tests/__tests__/__snapshots__/snapshot.test.js.snap @@ -1,154 +1,154 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Snapshot Validation deletes a snapshot when a test does removes all the snapshots 1`] = ` -"Test Suites: 3 passed, 3 total +Test Suites: 3 passed, 3 total Tests: 9 passed, 9 total Snapshots: 9 added, 9 total Time: <> Ran all test suites. -" + `; exports[`Snapshot Validation deletes a snapshot when a test does removes all the snapshots 2`] = ` -"Test Suites: 3 passed, 3 total +Test Suites: 3 passed, 3 total Tests: 6 passed, 6 total Snapshots: 5 passed, 5 total Time: <> Ran all test suites. -" + `; exports[`Snapshot Validation deletes the snapshot if the test suite has been removed 1`] = ` -"Test Suites: 3 passed, 3 total +Test Suites: 3 passed, 3 total Tests: 9 passed, 9 total Snapshots: 9 added, 9 total Time: <> Ran all test suites. -" + `; exports[`Snapshot Validation deletes the snapshot if the test suite has been removed 2`] = ` -"Test Suites: 2 passed, 2 total +Test Suites: 2 passed, 2 total Tests: 5 passed, 5 total Snapshots: 5 passed, 5 total Time: <> Ran all test suites. -" + `; exports[`Snapshot Validation does not save snapshots in CI mode by default 1`] = ` -"Test Suites: 3 failed, 3 total +Test Suites: 3 failed, 3 total Tests: 7 failed, 2 passed, 9 total Snapshots: 9 failed, 9 total Time: <> Ran all test suites. -" + `; exports[`Snapshot Validation updates the snapshot when a test removes some snapshots 1`] = ` -"Test Suites: 3 passed, 3 total +Test Suites: 3 passed, 3 total Tests: 9 passed, 9 total Snapshots: 9 added, 9 total Time: <> Ran all test suites. -" + `; exports[`Snapshot Validation updates the snapshot when a test removes some snapshots 2`] = ` -"Test Suites: 3 passed, 3 total +Test Suites: 3 passed, 3 total Tests: 9 passed, 9 total Snapshots: 1 updated, 7 passed, 8 total Time: <> Ran all test suites. -" + `; exports[`Snapshot Validation works on subsequent runs without \`-u\` 1`] = ` -"Test Suites: 3 passed, 3 total +Test Suites: 3 passed, 3 total Tests: 9 passed, 9 total Snapshots: 9 added, 9 total Time: <> Ran all test suites. -" + `; exports[`Snapshot Validation works on subsequent runs without \`-u\` 2`] = ` -"Test Suites: 3 passed, 3 total +Test Suites: 3 passed, 3 total Tests: 9 passed, 9 total Snapshots: 9 passed, 9 total Time: <> Ran all test suites. -" + `; exports[`Snapshot stores new snapshots on the first run 1`] = ` -"Test Suites: 2 passed, 2 total +Test Suites: 2 passed, 2 total Tests: 5 passed, 5 total Snapshots: 5 added, 5 total Time: <> Ran all test suites. -" + `; exports[`Snapshot works with escaped characters 1`] = ` -"Test Suites: 1 passed, 1 total +Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 1 added, 1 total Time: <> Ran all test suites matching /snapshot.test.js/i. -" + `; exports[`Snapshot works with escaped characters 2`] = ` -"Test Suites: 1 passed, 1 total +Test Suites: 1 passed, 1 total Tests: 2 passed, 2 total Snapshots: 1 added, 1 passed, 2 total Time: <> Ran all test suites matching /snapshot.test.js/i. -" + `; exports[`Snapshot works with escaped characters 3`] = ` -"Test Suites: 1 passed, 1 total +Test Suites: 1 passed, 1 total Tests: 2 passed, 2 total Snapshots: 2 passed, 2 total Time: <> Ran all test suites matching /snapshot.test.js/i. -" + `; exports[`Snapshot works with escaped regex 1`] = ` -"Test Suites: 1 passed, 1 total +Test Suites: 1 passed, 1 total Tests: 2 passed, 2 total Snapshots: 2 added, 2 total Time: <> Ran all test suites matching /snapshot_escape_regex.js/i. -" + `; exports[`Snapshot works with escaped regex 2`] = ` -"Test Suites: 1 passed, 1 total +Test Suites: 1 passed, 1 total Tests: 2 passed, 2 total Snapshots: 2 passed, 2 total Time: <> Ran all test suites matching /snapshot_escape_regex.js/i. -" + `; exports[`Snapshot works with template literal subsitutions 1`] = ` -"Test Suites: 1 passed, 1 total +Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 1 added, 1 total Time: <> Ran all test suites matching /snapshot_escape_substitution.test.js/i. -" + `; exports[`Snapshot works with template literal subsitutions 2`] = ` -"Test Suites: 1 passed, 1 total +Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 1 passed, 1 total Time: <> Ran all test suites matching /snapshot_escape_substitution.test.js/i. -" + `; diff --git a/integration_tests/__tests__/__snapshots__/snapshot_serializers.test.js.snap b/integration_tests/__tests__/__snapshots__/snapshot_serializers.test.js.snap index 4acc30034214..ff66572c3878 100644 --- a/integration_tests/__tests__/__snapshots__/snapshot_serializers.test.js.snap +++ b/integration_tests/__tests__/__snapshots__/snapshot_serializers.test.js.snap @@ -2,43 +2,43 @@ exports[`Snapshot serializers renders snapshot 1`] = ` Object { - "snapshot serializers works with default serializers 1": " + "snapshot serializers works with default serializers 1": \`
-", +\`, "snapshot serializers works with first plugin 1": "foo - 1", "snapshot serializers works with nested serializable objects 1": "foo - bar - 2", - "snapshot serializers works with prepended plugins and default serializers 1": " + "snapshot serializers works with prepended plugins and default serializers 1": \`
-", - "snapshot serializers works with prepended plugins from expect method called once 1": " +\`, + "snapshot serializers works with prepended plugins from expect method called once 1": \`
-", - "snapshot serializers works with prepended plugins from expect method called twice 1": " +\`, + "snapshot serializers works with prepended plugins from expect method called twice 1": \`
-", +\`, "snapshot serializers works with second plugin 1": "bar - 2", } `; diff --git a/integration_tests/__tests__/__snapshots__/stack_trace.test.js.snap b/integration_tests/__tests__/__snapshots__/stack_trace.test.js.snap index 0e8075de198a..6d0538ffb87c 100644 --- a/integration_tests/__tests__/__snapshots__/stack_trace.test.js.snap +++ b/integration_tests/__tests__/__snapshots__/stack_trace.test.js.snap @@ -1,64 +1,64 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Stack Trace does not print a stack trace for errors when --noStackTrace is given 1`] = ` -"Test Suites: 1 failed, 1 total +Test Suites: 1 failed, 1 total Tests: 3 failed, 3 total Snapshots: 0 total Time: <> Ran all test suites matching /test_error.test.js/i. -" + `; exports[`Stack Trace does not print a stack trace for matching errors when --noStackTrace is given 1`] = ` -"Test Suites: 1 failed, 1 total +Test Suites: 1 failed, 1 total Tests: 1 failed, 1 total Snapshots: 0 total Time: <> Ran all test suites matching /stack_trace.test.js/i. -" + `; exports[`Stack Trace does not print a stack trace for runtime errors when --noStackTrace is given 1`] = ` -"Test Suites: 1 failed, 1 total +Test Suites: 1 failed, 1 total Tests: 0 total Snapshots: 0 total Time: <> Ran all test suites matching /runtime_error.test.js/i. -" + `; exports[`Stack Trace prints a stack trace for errors 1`] = ` -"Test Suites: 1 failed, 1 total +Test Suites: 1 failed, 1 total Tests: 3 failed, 3 total Snapshots: 0 total Time: <> Ran all test suites matching /test_error.test.js/i. -" + `; exports[`Stack Trace prints a stack trace for errors without message in stack trace 1`] = ` -"Test Suites: 1 failed, 1 total +Test Suites: 1 failed, 1 total Tests: 1 failed, 1 total Snapshots: 0 total Time: <> Ran all test suites matching /stack_trace_without_message.test.js/i. -" + `; exports[`Stack Trace prints a stack trace for matching errors 1`] = ` -"Test Suites: 1 failed, 1 total +Test Suites: 1 failed, 1 total Tests: 1 failed, 1 total Snapshots: 0 total Time: <> Ran all test suites matching /stack_trace.test.js/i. -" + `; exports[`Stack Trace prints a stack trace for runtime errors 1`] = ` -"Test Suites: 1 failed, 1 total +Test Suites: 1 failed, 1 total Tests: 0 total Snapshots: 0 total Time: <> Ran all test suites matching /runtime_error.test.js/i. -" + `; diff --git a/integration_tests/__tests__/__snapshots__/test_name_pattern.test.js.snap b/integration_tests/__tests__/__snapshots__/test_name_pattern.test.js.snap index 317165f41bea..803542438689 100644 --- a/integration_tests/__tests__/__snapshots__/test_name_pattern.test.js.snap +++ b/integration_tests/__tests__/__snapshots__/test_name_pattern.test.js.snap @@ -1,10 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`testNamePattern 1`] = ` -"Test Suites: 1 passed, 1 total +Test Suites: 1 passed, 1 total Tests: 2 skipped, 2 passed, 4 total Snapshots: 0 total Time: <> -Ran all test suites with tests matching \\"should match\\". -" +Ran all test suites with tests matching "should match". + `; diff --git a/integration_tests/__tests__/__snapshots__/timeouts.test.js.snap b/integration_tests/__tests__/__snapshots__/timeouts.test.js.snap index 13b00317ee7a..acb98d6757cf 100644 --- a/integration_tests/__tests__/__snapshots__/timeouts.test.js.snap +++ b/integration_tests/__tests__/__snapshots__/timeouts.test.js.snap @@ -1,26 +1,26 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`does not exceed the timeout 1`] = ` -" PASS __tests__/a-banana.js + PASS __tests__/a-banana.js ✓ banana -" + `; exports[`does not exceed the timeout 2`] = ` -"Test Suites: 1 passed, 1 total +Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: <> Ran all test suites. -" + `; exports[`exceeds the timeout 1`] = ` -"Test Suites: 1 failed, 1 total +Test Suites: 1 failed, 1 total Tests: 1 failed, 1 total Snapshots: 0 total Time: <> Ran all test suites. -" + `; diff --git a/integration_tests/__tests__/__snapshots__/transform.test.js.snap b/integration_tests/__tests__/__snapshots__/transform.test.js.snap index e55d9338bb39..7ba61a9d258f 100644 --- a/integration_tests/__tests__/__snapshots__/transform.test.js.snap +++ b/integration_tests/__tests__/__snapshots__/transform.test.js.snap @@ -1,30 +1,30 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`babel-jest instruments only specific files and collects coverage 1`] = ` -"------------|----------|----------|----------|----------|----------------| +------------|----------|----------|----------|----------|----------------| File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines | ------------|----------|----------|----------|----------|----------------| All files | 83.33 | 100 | 50 | 83.33 | | covered.js | 83.33 | 100 | 50 | 83.33 | 16 | ------------|----------|----------|----------|----------|----------------| -" + `; exports[`custom transformer instruments files 1`] = ` -"----------|----------|----------|----------|----------|----------------| +----------|----------|----------|----------|----------|----------------| File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines | ----------|----------|----------|----------|----------|----------------| All files | Unknown | Unknown | Unknown | Unknown | | ----------|----------|----------|----------|----------|----------------| -" + `; exports[`no babel-jest instrumentation with no babel-jest 1`] = ` -"------------|----------|----------|----------|----------|----------------| +------------|----------|----------|----------|----------|----------------| File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines | ------------|----------|----------|----------|----------|----------------| All files | 83.33 | 100 | 50 | 83.33 | | covered.js | 83.33 | 100 | 50 | 83.33 | 16 | ------------|----------|----------|----------|----------|----------------| -" + `; diff --git a/integration_tests/__tests__/__snapshots__/typescript_coverage.test.js.snap b/integration_tests/__tests__/__snapshots__/typescript_coverage.test.js.snap index a81fd746e81e..703a9639c49c 100644 --- a/integration_tests/__tests__/__snapshots__/typescript_coverage.test.js.snap +++ b/integration_tests/__tests__/__snapshots__/typescript_coverage.test.js.snap @@ -1,11 +1,11 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`instruments and collects coverage for typescript files 1`] = ` -"------------|----------|----------|----------|----------|----------------| +------------|----------|----------|----------|----------|----------------| File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines | ------------|----------|----------|----------|----------|----------------| All files | 100 | 100 | 100 | 100 | | covered.ts | 100 | 100 | 100 | 100 | | ------------|----------|----------|----------|----------|----------------| -" + `; diff --git a/packages/jest-cli/src/__tests__/__snapshots__/watch.test.js.snap b/packages/jest-cli/src/__tests__/__snapshots__/watch.test.js.snap index 78c6c1e663aa..5f4ccbfe159f 100644 --- a/packages/jest-cli/src/__tests__/__snapshots__/watch.test.js.snap +++ b/packages/jest-cli/src/__tests__/__snapshots__/watch.test.js.snap @@ -2,13 +2,13 @@ exports[`Watch mode flows Runs Jest once by default and shows usage 1`] = ` Array [ - " + \` Watch Usage › Press a to run all tests. › Press p to filter by a filename regex pattern. › Press t to filter by a test name regex pattern. › Press q to quit watch mode. › Press Enter to trigger a test run. -", +\`, ] `; diff --git a/packages/jest-cli/src/__tests__/__snapshots__/watch_filename_pattern_mode.test.js.snap b/packages/jest-cli/src/__tests__/__snapshots__/watch_filename_pattern_mode.test.js.snap index bf98d9fe0e04..bdfe8693514b 100644 --- a/packages/jest-cli/src/__tests__/__snapshots__/watch_filename_pattern_mode.test.js.snap +++ b/packages/jest-cli/src/__tests__/__snapshots__/watch_filename_pattern_mode.test.js.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Watch mode flows Pressing "P" enters pattern mode 1`] = ` -" + pattern › p @@ -32,11 +32,11 @@ exports[`Watch mode flows Pressing "P" enters pattern mode 1`] = ` ...and 1 more file [MOCK - cursorTo(12, 5)] -[MOCK - cursorRestorePosition]" +[MOCK - cursorRestorePosition] `; exports[`Watch mode flows Pressing "P" enters pattern mode 2`] = ` -" + pattern › p. @@ -67,11 +67,11 @@ exports[`Watch mode flows Pressing "P" enters pattern mode 2`] = ` ...and 1 more file [MOCK - cursorTo(13, 5)] -[MOCK - cursorRestorePosition]" +[MOCK - cursorRestorePosition] `; exports[`Watch mode flows Pressing "P" enters pattern mode 3`] = ` -" + pattern › p.* @@ -102,11 +102,11 @@ exports[`Watch mode flows Pressing "P" enters pattern mode 3`] = ` ...and 1 more file [MOCK - cursorTo(14, 5)] -[MOCK - cursorRestorePosition]" +[MOCK - cursorRestorePosition] `; exports[`Watch mode flows Pressing "P" enters pattern mode 4`] = ` -" + pattern › p.*1 @@ -121,11 +121,11 @@ exports[`Watch mode flows Pressing "P" enters pattern mode 4`] = ` › path/to/file11-test.js [MOCK - cursorTo(15, 5)] -[MOCK - cursorRestorePosition]" +[MOCK - cursorRestorePosition] `; exports[`Watch mode flows Pressing "P" enters pattern mode 5`] = ` -" + pattern › p.*10 @@ -136,11 +136,11 @@ exports[`Watch mode flows Pressing "P" enters pattern mode 5`] = ` › path/to/file10-test.js [MOCK - cursorTo(16, 5)] -[MOCK - cursorRestorePosition]" +[MOCK - cursorRestorePosition] `; exports[`Watch mode flows Pressing "P" enters pattern mode 6`] = ` -" + pattern › p.*1 @@ -155,11 +155,11 @@ exports[`Watch mode flows Pressing "P" enters pattern mode 6`] = ` › path/to/file11-test.js [MOCK - cursorTo(15, 5)] -[MOCK - cursorRestorePosition]" +[MOCK - cursorRestorePosition] `; exports[`Watch mode flows Pressing "P" enters pattern mode 7`] = ` -" + pattern › p.* @@ -190,11 +190,11 @@ exports[`Watch mode flows Pressing "P" enters pattern mode 7`] = ` ...and 1 more file [MOCK - cursorTo(14, 5)] -[MOCK - cursorRestorePosition]" +[MOCK - cursorRestorePosition] `; exports[`Watch mode flows Pressing "P" enters pattern mode 8`] = ` -" + pattern › p.*3 @@ -205,11 +205,11 @@ exports[`Watch mode flows Pressing "P" enters pattern mode 8`] = ` › path/to/file3-test.js [MOCK - cursorTo(15, 5)] -[MOCK - cursorRestorePosition]" +[MOCK - cursorRestorePosition] `; exports[`Watch mode flows Pressing "c" clears the filters 1`] = ` -"[MOCK - cursorHide] +[MOCK - cursorHide] [MOCK - clearScreen] Pattern Mode Usage @@ -227,11 +227,11 @@ Pattern Mode Usage Start typing to filter by a filename regex pattern. [MOCK - cursorTo(11, 5)] -[MOCK - cursorRestorePosition]" +[MOCK - cursorRestorePosition] `; exports[`Watch mode flows Results in pattern mode get truncated appropriately 1`] = ` -" + pattern › a @@ -262,11 +262,11 @@ exports[`Watch mode flows Results in pattern mode get truncated appropriately 1` ...and 1 more file [MOCK - cursorTo(12, 5)] -[MOCK - cursorRestorePosition]" +[MOCK - cursorRestorePosition] `; exports[`Watch mode flows Results in pattern mode get truncated appropriately 2`] = ` -" + pattern › a @@ -297,11 +297,11 @@ exports[`Watch mode flows Results in pattern mode get truncated appropriately 2` ...and 1 more file [MOCK - cursorTo(12, 5)] -[MOCK - cursorRestorePosition]" +[MOCK - cursorRestorePosition] `; exports[`Watch mode flows Results in pattern mode get truncated appropriately 3`] = ` -" + pattern › a @@ -332,11 +332,11 @@ exports[`Watch mode flows Results in pattern mode get truncated appropriately 3` ...and 1 more file [MOCK - cursorTo(12, 5)] -[MOCK - cursorRestorePosition]" +[MOCK - cursorRestorePosition] `; exports[`Watch mode flows Shows the appropiate header when both filters are active 1`] = ` -"[MOCK - cursorHide] +[MOCK - cursorHide] [MOCK - clearScreen] Active Filters: filename /p.*10/, test name /test/ @@ -357,11 +357,11 @@ Pattern Mode Usage Start typing to filter by a test name regex pattern. [MOCK - cursorTo(11, 7)] -[MOCK - cursorRestorePosition]" +[MOCK - cursorRestorePosition] `; exports[`Watch mode flows Shows the appropiate header when the filename filter is active 1`] = ` -"[MOCK - cursorHide] +[MOCK - cursorHide] [MOCK - clearScreen] Active Filters: filename /p.*10/ @@ -382,11 +382,11 @@ Pattern Mode Usage Start typing to filter by a filename regex pattern. [MOCK - cursorTo(11, 7)] -[MOCK - cursorRestorePosition]" +[MOCK - cursorRestorePosition] `; exports[`Watch mode flows Shows the appropiate header when the filename filter is active 2`] = ` -"[MOCK - cursorHide] +[MOCK - cursorHide] [MOCK - clearScreen] Active Filters: filename /p/ @@ -407,11 +407,11 @@ Pattern Mode Usage Start typing to filter by a filename regex pattern. [MOCK - cursorTo(11, 7)] -[MOCK - cursorRestorePosition]" +[MOCK - cursorRestorePosition] `; exports[`Watch mode flows Shows the appropiate header when the test name filter is active 1`] = ` -"[MOCK - cursorHide] +[MOCK - cursorHide] [MOCK - clearScreen] Active Filters: test name /test/ @@ -432,11 +432,11 @@ Pattern Mode Usage Start typing to filter by a test name regex pattern. [MOCK - cursorTo(11, 7)] -[MOCK - cursorRestorePosition]" +[MOCK - cursorRestorePosition] `; exports[`Watch mode flows Shows the appropiate header when the test name filter is active 2`] = ` -"[MOCK - cursorHide] +[MOCK - cursorHide] [MOCK - clearScreen] Active Filters: test name /t/ @@ -457,7 +457,7 @@ Pattern Mode Usage Start typing to filter by a test name regex pattern. [MOCK - cursorTo(11, 7)] -[MOCK - cursorRestorePosition]" +[MOCK - cursorRestorePosition] `; exports[`Watch mode flows can select a specific file name from the typeahead results 1`] = `"path/to/file2-test.js"`; diff --git a/packages/jest-cli/src/__tests__/__snapshots__/watch_test_name_pattern_mode.test.js.snap b/packages/jest-cli/src/__tests__/__snapshots__/watch_test_name_pattern_mode.test.js.snap index 73d0b2048b57..8806684f36db 100644 --- a/packages/jest-cli/src/__tests__/__snapshots__/watch_test_name_pattern_mode.test.js.snap +++ b/packages/jest-cli/src/__tests__/__snapshots__/watch_test_name_pattern_mode.test.js.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Watch mode flows Pressing "T" enters pattern mode 1`] = ` -" + pattern › c @@ -28,11 +28,11 @@ exports[`Watch mode flows Pressing "T" enters pattern mode 1`] = ` › should convert grep string to a RegExp [MOCK - cursorTo(12, 5)] -[MOCK - cursorRestorePosition]" +[MOCK - cursorRestorePosition] `; exports[`Watch mode flows Pressing "T" enters pattern mode 2`] = ` -" + pattern › co @@ -57,11 +57,11 @@ exports[`Watch mode flows Pressing "T" enters pattern mode 2`] = ` › should convert grep string to a RegExp [MOCK - cursorTo(13, 5)] -[MOCK - cursorRestorePosition]" +[MOCK - cursorRestorePosition] `; exports[`Watch mode flows Pressing "T" enters pattern mode 3`] = ` -" + pattern › con @@ -78,11 +78,11 @@ exports[`Watch mode flows Pressing "T" enters pattern mode 3`] = ` › should convert grep string to a RegExp [MOCK - cursorTo(14, 5)] -[MOCK - cursorRestorePosition]" +[MOCK - cursorRestorePosition] `; exports[`Watch mode flows Pressing "T" enters pattern mode 4`] = ` -" + pattern › con @@ -91,11 +91,11 @@ exports[`Watch mode flows Pressing "T" enters pattern mode 4`] = ` Pattern matches no tests from cached test suites [MOCK - cursorTo(15, 5)] -[MOCK - cursorRestorePosition]" +[MOCK - cursorRestorePosition] `; exports[`Watch mode flows Pressing "T" enters pattern mode 5`] = ` -" + pattern › con 1 @@ -104,11 +104,11 @@ exports[`Watch mode flows Pressing "T" enters pattern mode 5`] = ` Pattern matches no tests from cached test suites [MOCK - cursorTo(16, 5)] -[MOCK - cursorRestorePosition]" +[MOCK - cursorRestorePosition] `; exports[`Watch mode flows Pressing "T" enters pattern mode 6`] = ` -" + pattern › con 12 @@ -117,11 +117,11 @@ exports[`Watch mode flows Pressing "T" enters pattern mode 6`] = ` Pattern matches no tests from cached test suites [MOCK - cursorTo(17, 5)] -[MOCK - cursorRestorePosition]" +[MOCK - cursorRestorePosition] `; exports[`Watch mode flows Pressing "T" enters pattern mode 7`] = ` -" + pattern › con 1 @@ -130,11 +130,11 @@ exports[`Watch mode flows Pressing "T" enters pattern mode 7`] = ` Pattern matches no tests from cached test suites [MOCK - cursorTo(16, 5)] -[MOCK - cursorRestorePosition]" +[MOCK - cursorRestorePosition] `; exports[`Watch mode flows Pressing "T" enters pattern mode 8`] = ` -" + pattern › con @@ -143,11 +143,11 @@ exports[`Watch mode flows Pressing "T" enters pattern mode 8`] = ` Pattern matches no tests from cached test suites [MOCK - cursorTo(15, 5)] -[MOCK - cursorRestorePosition]" +[MOCK - cursorRestorePosition] `; exports[`Watch mode flows Pressing "T" enters pattern mode 9`] = ` -" + pattern › con * @@ -164,11 +164,11 @@ exports[`Watch mode flows Pressing "T" enters pattern mode 9`] = ` › should convert grep string to a RegExp [MOCK - cursorTo(16, 5)] -[MOCK - cursorRestorePosition]" +[MOCK - cursorRestorePosition] `; exports[`Watch mode flows Results in pattern mode get truncated appropriately 1`] = ` -" + pattern › t @@ -195,11 +195,11 @@ exports[`Watch mode flows Results in pattern mode get truncated appropriately 1` › should convert grep string to a RegExp [MOCK - cursorTo(12, 5)] -[MOCK - cursorRestorePosition]" +[MOCK - cursorRestorePosition] `; exports[`Watch mode flows Results in pattern mode get truncated appropriately 2`] = ` -" + pattern › t @@ -226,5 +226,5 @@ exports[`Watch mode flows Results in pattern mode get truncated appropriately 2` › should convert grep str... [MOCK - cursorTo(12, 5)] -[MOCK - cursorRestorePosition]" +[MOCK - cursorRestorePosition] `; diff --git a/packages/jest-cli/src/lib/__tests__/__snapshots__/log_debug_messages.test.js.snap b/packages/jest-cli/src/lib/__tests__/__snapshots__/log_debug_messages.test.js.snap index 16e1a6040a64..ad80f5bec087 100644 --- a/packages/jest-cli/src/lib/__tests__/__snapshots__/log_debug_messages.test.js.snap +++ b/packages/jest-cli/src/lib/__tests__/__snapshots__/log_debug_messages.test.js.snap @@ -1,45 +1,45 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`prints the config object 1`] = ` -"{ - \\"configs\\": { - \\"rootDir\\": \\"/path/to/dir\\", - \\"roots\\": [ - \\"path/to/dir/test\\" +{ + "configs": { + "rootDir": "/path/to/dir", + "roots": [ + "path/to/dir/test" ], - \\"testRunner\\": \\"myRunner\\" + "testRunner": "myRunner" }, - \\"globalConfig\\": { - \\"automock\\": false, - \\"watch\\": true + "globalConfig": { + "automock": false, + "watch": true }, - \\"version\\": 123 + "version": 123 } -" + `; exports[`prints the jest version 1`] = ` -"{ - \\"configs\\": { - \\"testRunner\\": \\"myRunner\\" +{ + "configs": { + "testRunner": "myRunner" }, - \\"globalConfig\\": { - \\"watch\\": true + "globalConfig": { + "watch": true }, - \\"version\\": 123 + "version": 123 } -" + `; exports[`prints the test framework name 1`] = ` -"{ - \\"configs\\": { - \\"testRunner\\": \\"myRunner\\" +{ + "configs": { + "testRunner": "myRunner" }, - \\"globalConfig\\": { - \\"watch\\": true + "globalConfig": { + "watch": true }, - \\"version\\": 123 + "version": 123 } -" + `; diff --git a/packages/jest-cli/src/reporters/__tests__/__snapshots__/utils.test.js.snap b/packages/jest-cli/src/reporters/__tests__/__snapshots__/utils.test.js.snap index 27b939ba8e4f..b660b52f422c 100644 --- a/packages/jest-cli/src/reporters/__tests__/__snapshots__/utils.test.js.snap +++ b/packages/jest-cli/src/reporters/__tests__/__snapshots__/utils.test.js.snap @@ -15,7 +15,7 @@ exports[`wrapAnsiString() returns the string unaltered if given a terminal width exports[`wrapAnsiString() returns the string unaltered if given a terminal width of zero 2`] = `"This string shouldn't cause you any trouble"`; exports[`wrapAnsiString() wraps a long string containing ansi chars 1`] = ` -"abcde red- +abcde red- bold 12344 56bcd 123t tttttththt @@ -27,11 +27,11 @@ etetetette tetetetete tetetestnh snthsnthss -ot" +ot `; exports[`wrapAnsiString() wraps a long string containing ansi chars 2`] = ` -"abcde red- +abcde red- bold 12344 56bcd 123t tttttththt @@ -43,5 +43,5 @@ etetetette tetetetete tetetestnh snthsnthss -ot" +ot `; diff --git a/packages/jest-config/src/__tests__/__snapshots__/normalize.test.js.snap b/packages/jest-config/src/__tests__/__snapshots__/normalize.test.js.snap index 242e96770347..1a24ac2e049c 100644 --- a/packages/jest-config/src/__tests__/__snapshots__/normalize.test.js.snap +++ b/packages/jest-config/src/__tests__/__snapshots__/normalize.test.js.snap @@ -1,58 +1,58 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Upgrade help logs a warning when \`scriptPreprocessor\` and/or \`preprocessorIgnorePatterns\` are used 1`] = ` -" Deprecation Warning: - - Option \\"preprocessorIgnorePatterns\\" was replaced by \\"transformIgnorePatterns\\", which support multiple preprocessors. - - Jest now treats your current configuration as: - { - \\"transformIgnorePatterns\\": [\\"bar/baz\\", \\"qux/quux\\"] - } - - Please update your configuration. + Deprecation Warning: + + Option "preprocessorIgnorePatterns" was replaced by "transformIgnorePatterns", which support multiple preprocessors. + + Jest now treats your current configuration as: + { + "transformIgnorePatterns": ["bar/baz", "qux/quux"] + } + + Please update your configuration. + + Configuration Documentation: + https://facebook.github.io/jest/docs/configuration.html - Configuration Documentation: - https://facebook.github.io/jest/docs/configuration.html -" `; exports[`preset throws when preset not found 1`] = ` -"Validation Error: - - Preset doesnt-exist not found. - - Configuration Documentation: - https://facebook.github.io/jest/docs/configuration.html -" +Validation Error: + + Preset doesnt-exist not found. + + Configuration Documentation: + https://facebook.github.io/jest/docs/configuration.html + `; exports[`rootDir throws if the options is missing a rootDir property 1`] = ` -"Validation Error: - - Configuration option rootDir must be specified. - - Configuration Documentation: - https://facebook.github.io/jest/docs/configuration.html -" +Validation Error: + + Configuration option rootDir must be specified. + + Configuration Documentation: + https://facebook.github.io/jest/docs/configuration.html + `; exports[`testEnvironment throws on invalid environment names 1`] = ` -"Validation Error: - - Test environment phantom cannot be found. Make sure the testEnvironment configuration option points to an existing node module. - - Configuration Documentation: - https://facebook.github.io/jest/docs/configuration.html -" +Validation Error: + + Test environment phantom cannot be found. Make sure the testEnvironment configuration option points to an existing node module. + + Configuration Documentation: + https://facebook.github.io/jest/docs/configuration.html + `; exports[`testMatch throws if testRegex and testMatch are both specified 1`] = ` -"Validation Error: - - Configuration options testMatch and testRegex cannot be used together. - - Configuration Documentation: - https://facebook.github.io/jest/docs/configuration.html -" +Validation Error: + + Configuration options testMatch and testRegex cannot be used together. + + Configuration Documentation: + https://facebook.github.io/jest/docs/configuration.html + `; diff --git a/packages/jest-diff/src/__tests__/__snapshots__/diff.test.js.snap b/packages/jest-diff/src/__tests__/__snapshots__/diff.test.js.snap index 641d8cf6218a..601c683f4807 100644 --- a/packages/jest-diff/src/__tests__/__snapshots__/diff.test.js.snap +++ b/packages/jest-diff/src/__tests__/__snapshots__/diff.test.js.snap @@ -1,10 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`collapses big diffs to patch format 1`] = ` -"- Expected +- Expected + Received -@@ -6,9 +6,9 @@ +@@ -6,9 +6,9 @@ 4, 5, 6, @@ -14,14 +14,14 @@ exports[`collapses big diffs to patch format 1`] = ` 9, - 10, ], - }" + } `; exports[`context number of lines: -1 (5 default) 1`] = ` -"- Expected +- Expected + Received -@@ -6,9 +6,9 @@ +@@ -6,9 +6,9 @@ 4, 5, 6, @@ -31,50 +31,50 @@ exports[`context number of lines: -1 (5 default) 1`] = ` 9, - 10, ], - }" + } `; exports[`context number of lines: 0 1`] = ` -"- Expected +- Expected + Received -@@ -11,0 +11,1 @@ +@@ -11,0 +11,1 @@ + 10, -@@ -12,1 +13,0 @@ -- 10," +@@ -12,1 +13,0 @@ +- 10, `; exports[`context number of lines: 1 1`] = ` -"- Expected +- Expected + Received -@@ -10,4 +10,4 @@ +@@ -10,4 +10,4 @@ 8, + 10, 9, - 10, - ]," + ], `; exports[`context number of lines: 2 1`] = ` -"- Expected +- Expected + Received -@@ -9,6 +9,6 @@ +@@ -9,6 +9,6 @@ 7, 8, + 10, 9, - 10, ], - }" + } `; exports[`context number of lines: null (5 default) 1`] = ` -"- Expected +- Expected + Received -@@ -6,9 +6,9 @@ +@@ -6,9 +6,9 @@ 4, 5, 6, @@ -84,21 +84,21 @@ exports[`context number of lines: null (5 default) 1`] = ` 9, - 10, ], - }" + } `; exports[`falls back to not call toJSON if objects look identical 1`] = ` -"Compared values serialize to the same structure. -Printing internal object structure without calling \`toJSON\` instead. +Compared values serialize to the same structure. +Printing internal object structure without calling \`toJSON\` instead. - Expected + Received Object { -- \\"line\\": 1, -+ \\"line\\": 2, - \\"toJSON\\": [Function toJSON], - }" +- "line": 1, ++ "line": 2, + "toJSON": [Function toJSON], + } `; exports[`prints a fallback message if two objects truly look identical 1`] = `"Compared values have no visual difference."`; diff --git a/packages/jest-haste-map/src/__tests__/__snapshots__/index.test.js.snap b/packages/jest-haste-map/src/__tests__/__snapshots__/index.test.js.snap index 4e1c96ddd868..66a130dbf674 100644 --- a/packages/jest-haste-map/src/__tests__/__snapshots__/index.test.js.snap +++ b/packages/jest-haste-map/src/__tests__/__snapshots__/index.test.js.snap @@ -1,19 +1,19 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`HasteMap file system changes processing recovery from duplicate module IDs recovers when the most recent duplicate is fixed 1`] = ` -"The name \`Pear\` was looked up in the Haste module map. It cannot be resolved, because there exists several different files, or packages, that provide a module for that particular name and platform. The platform is generic (no extension). You must delete or blacklist files until there remains only one of these: +The name \`Pear\` was looked up in the Haste module map. It cannot be resolved, because there exists several different files, or packages, that provide a module for that particular name and platform. The platform is generic (no extension). You must delete or blacklist files until there remains only one of these: * \`/fruits/blueberry.js\` (module) * \`/fruits/pear.js\` (module) -" + `; exports[`HasteMap file system changes processing recovery from duplicate module IDs recovers when the oldest version of the duplicates is fixed 1`] = ` -"The name \`Pear\` was looked up in the Haste module map. It cannot be resolved, because there exists several different files, or packages, that provide a module for that particular name and platform. The platform is generic (no extension). You must delete or blacklist files until there remains only one of these: +The name \`Pear\` was looked up in the Haste module map. It cannot be resolved, because there exists several different files, or packages, that provide a module for that particular name and platform. The platform is generic (no extension). You must delete or blacklist files until there remains only one of these: * \`/fruits/blueberry.js\` (module) * \`/fruits/pear.js\` (module) -" + `; exports[`HasteMap throws on duplicate module ids if "throwOnModuleCollision" is set to true 1`] = ` @@ -25,13 +25,13 @@ This error is caused by a @providesModule declaration with the same name across `; exports[`HasteMap tries to crawl using node as a fallback 1`] = ` -"jest-haste-map: Watchman crawl failed. Retrying once with node crawler. +jest-haste-map: Watchman crawl failed. Retrying once with node crawler. Usually this happens when watchman isn't running. Create an empty \`.watchmanconfig\` file in your project's root folder or initialize a git or hg repository in your project. - Error: watchman error" + Error: watchman error `; exports[`HasteMap warns on duplicate mock files 1`] = ` -"jest-haste-map: duplicate manual mock found: +jest-haste-map: duplicate manual mock found: Module name: subdir/blueberry Duplicate Mock path: /fruits2/__mocks__/subdir/blueberry.js This warning is caused by two manual mock files with the same file name. @@ -41,13 +41,13 @@ Jest will use the mock file found in: /fruits1/__mocks__/subdir/blueberry.js /fruits2/__mocks__/subdir/blueberry.js -" + `; exports[`HasteMap warns on duplicate module ids 1`] = ` -"jest-haste-map: @providesModule naming collision: +jest-haste-map: @providesModule naming collision: Duplicate module name: Strawberry Paths: /fruits/raspberry.js collides with /fruits/strawberry.js -This warning is caused by a @providesModule declaration with the same name across two different files." +This warning is caused by a @providesModule declaration with the same name across two different files. `; diff --git a/packages/jest-jasmine2/src/__tests__/__snapshots__/matchers.test.js.snap b/packages/jest-jasmine2/src/__tests__/__snapshots__/matchers.test.js.snap index ab86a24dc19f..36c37f9f8246 100644 --- a/packages/jest-jasmine2/src/__tests__/__snapshots__/matchers.test.js.snap +++ b/packages/jest-jasmine2/src/__tests__/__snapshots__/matchers.test.js.snap @@ -1,10 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`matchers proxies matchers to jest-matchers 1`] = ` -"expect(received).toBe(expected) +expect(received).toBe(expected) Expected value to be (using ===): 2 Received: - 1" + 1 `; diff --git a/packages/jest-matcher-utils/src/__tests__/__snapshots__/index.test.js.snap b/packages/jest-matcher-utils/src/__tests__/__snapshots__/index.test.js.snap index a25786610f30..11581621ac8c 100644 --- a/packages/jest-matcher-utils/src/__tests__/__snapshots__/index.test.js.snap +++ b/packages/jest-matcher-utils/src/__tests__/__snapshots__/index.test.js.snap @@ -5,12 +5,12 @@ exports[`.stringify() reduces maxDepth if stringifying very large objects 1`] = exports[`.stringify() reduces maxDepth if stringifying very large objects 2`] = `"{\\"a\\": 1, \\"b\\": {\\"0\\": \\"test\\", \\"1\\": \\"test\\", \\"2\\": \\"test\\", \\"3\\": \\"test\\", \\"4\\": \\"test\\", \\"5\\": \\"test\\", \\"6\\": \\"test\\", \\"7\\": \\"test\\", \\"8\\": \\"test\\", \\"9\\": \\"test\\"}}"`; exports[`.stringify() toJSON errors when comparing two objects 1`] = ` -"expect(received).toEqual(expected) +expect(received).toEqual(expected) Expected value to equal: - {\\"b\\": 1, \\"toJSON\\": [Function toJSON]} + {"b": 1, "toJSON": [Function toJSON]} Received: - {\\"a\\": 1, \\"toJSON\\": [Function toJSON]} + {"a": 1, "toJSON": [Function toJSON]} Difference: @@ -18,8 +18,8 @@ Difference: + Received Object { -- \\"b\\": 1, -+ \\"a\\": 1, - \\"toJSON\\": [Function toJSON], - }" +- "b": 1, ++ "a": 1, + "toJSON": [Function toJSON], + } `; diff --git a/packages/jest-matchers/src/__tests__/__snapshots__/matchers.test.js.snap b/packages/jest-matchers/src/__tests__/__snapshots__/matchers.test.js.snap index 238a0944159f..c4236121574c 100644 --- a/packages/jest-matchers/src/__tests__/__snapshots__/matchers.test.js.snap +++ b/packages/jest-matchers/src/__tests__/__snapshots__/matchers.test.js.snap @@ -1,150 +1,150 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`.rejects fails for promise that resolves 1`] = ` -"expect(received).rejects.toBe() +expect(received).rejects.toBe() Expected received Promise to reject, instead it resolved to value - 4" + 4 `; exports[`.rejects fails non-promise value "a" 1`] = ` -"expect(received).rejects.toBeDefined() +expect(received).rejects.toBeDefined() received value must be a Promise. Received: - string: \\"a\\"" + string: "a" `; exports[`.rejects fails non-promise value [1] 1`] = ` -"expect(received).rejects.toBeDefined() +expect(received).rejects.toBeDefined() received value must be a Promise. Received: - array: [1]" + array: [1] `; exports[`.rejects fails non-promise value [Function anonymous] 1`] = ` -"expect(received).rejects.toBeDefined() +expect(received).rejects.toBeDefined() received value must be a Promise. Received: - function: [Function anonymous]" + function: [Function anonymous] `; exports[`.rejects fails non-promise value {"a": 1} 1`] = ` -"expect(received).rejects.toBeDefined() +expect(received).rejects.toBeDefined() received value must be a Promise. Received: - object: {\\"a\\": 1}" + object: {"a": 1} `; exports[`.rejects fails non-promise value 4 1`] = ` -"expect(received).rejects.toBeDefined() +expect(received).rejects.toBeDefined() received value must be a Promise. Received: - number: 4" + number: 4 `; exports[`.rejects fails non-promise value null 1`] = ` -"expect(received).rejects.toBeDefined() +expect(received).rejects.toBeDefined() received value must be a Promise. -Received: null" +Received: null `; exports[`.rejects fails non-promise value true 1`] = ` -"expect(received).rejects.toBeDefined() +expect(received).rejects.toBeDefined() received value must be a Promise. Received: - boolean: true" + boolean: true `; exports[`.rejects fails non-promise value undefined 1`] = ` -"expect(received).rejects.toBeDefined() +expect(received).rejects.toBeDefined() received value must be a Promise. -Received: undefined" +Received: undefined `; exports[`.resolves fails for promise that rejects 1`] = ` -"expect(received).resolves.toBe() +expect(received).resolves.toBe() Expected received Promise to resolve, instead it rejected to value - 4" + 4 `; exports[`.resolves fails non-promise value "a" 1`] = ` -"expect(received).resolves.toBeDefined() +expect(received).resolves.toBeDefined() received value must be a Promise. Received: - string: \\"a\\"" + string: "a" `; exports[`.resolves fails non-promise value [1] 1`] = ` -"expect(received).resolves.toBeDefined() +expect(received).resolves.toBeDefined() received value must be a Promise. Received: - array: [1]" + array: [1] `; exports[`.resolves fails non-promise value [Function anonymous] 1`] = ` -"expect(received).resolves.toBeDefined() +expect(received).resolves.toBeDefined() received value must be a Promise. Received: - function: [Function anonymous]" + function: [Function anonymous] `; exports[`.resolves fails non-promise value {"a": 1} 1`] = ` -"expect(received).resolves.toBeDefined() +expect(received).resolves.toBeDefined() received value must be a Promise. Received: - object: {\\"a\\": 1}" + object: {"a": 1} `; exports[`.resolves fails non-promise value 4 1`] = ` -"expect(received).resolves.toBeDefined() +expect(received).resolves.toBeDefined() received value must be a Promise. Received: - number: 4" + number: 4 `; exports[`.resolves fails non-promise value null 1`] = ` -"expect(received).resolves.toBeDefined() +expect(received).resolves.toBeDefined() received value must be a Promise. -Received: null" +Received: null `; exports[`.resolves fails non-promise value true 1`] = ` -"expect(received).resolves.toBeDefined() +expect(received).resolves.toBeDefined() received value must be a Promise. Received: - boolean: true" + boolean: true `; exports[`.resolves fails non-promise value undefined 1`] = ` -"expect(received).resolves.toBeDefined() +expect(received).resolves.toBeDefined() received value must be a Promise. -Received: undefined" +Received: undefined `; exports[`.toBe() does not crash on circular references 1`] = ` -"expect(received).toBe(expected) +expect(received).toBe(expected) Expected value to be (using ===): {} Received: - {\\"circular\\": [Circular]} + {"circular": [Circular]} Difference: @@ -153,84 +153,84 @@ Difference: -Object {} +Object { -+ \\"circular\\": [Circular], -+}" ++ "circular": [Circular], ++} `; exports[`.toBe() fails for '"a"' with '.not' 1`] = ` -"expect(received).not.toBe(expected) +expect(received).not.toBe(expected) Expected value to not be (using ===): - \\"a\\" + "a" Received: - \\"a\\"" + "a" `; exports[`.toBe() fails for '[]' with '.not' 1`] = ` -"expect(received).not.toBe(expected) +expect(received).not.toBe(expected) Expected value to not be (using ===): [] Received: - []" + [] `; exports[`.toBe() fails for '{}' with '.not' 1`] = ` -"expect(received).not.toBe(expected) +expect(received).not.toBe(expected) Expected value to not be (using ===): {} Received: - {}" + {} `; exports[`.toBe() fails for '1' with '.not' 1`] = ` -"expect(received).not.toBe(expected) +expect(received).not.toBe(expected) Expected value to not be (using ===): 1 Received: - 1" + 1 `; exports[`.toBe() fails for 'false' with '.not' 1`] = ` -"expect(received).not.toBe(expected) +expect(received).not.toBe(expected) Expected value to not be (using ===): false Received: - false" + false `; exports[`.toBe() fails for 'null' with '.not' 1`] = ` -"expect(received).not.toBe(expected) +expect(received).not.toBe(expected) Expected value to not be (using ===): null Received: - null" + null `; exports[`.toBe() fails for 'undefined' with '.not' 1`] = ` -"expect(received).not.toBe(expected) +expect(received).not.toBe(expected) Expected value to not be (using ===): undefined Received: - undefined" + undefined `; exports[`.toBe() fails for: "abc" and "cde" 1`] = ` -"expect(received).toBe(expected) +expect(received).toBe(expected) Expected value to be (using ===): - \\"cde\\" + "cde" Received: - \\"abc\\"" + "abc" `; exports[`.toBe() fails for: [] and [] 1`] = ` -"expect(received).toBe(expected) +expect(received).toBe(expected) Expected value to be (using ===): [] @@ -239,29 +239,29 @@ Received: Difference: -Compared values have no visual difference." +Compared values have no visual difference. `; exports[`.toBe() fails for: {"a": 1} and {"a": 1} 1`] = ` -"expect(received).toBe(expected) +expect(received).toBe(expected) Expected value to be (using ===): - {\\"a\\": 1} + {"a": 1} Received: - {\\"a\\": 1} + {"a": 1} Difference: -Compared values have no visual difference." +Compared values have no visual difference. `; exports[`.toBe() fails for: {"a": 1} and {"a": 5} 1`] = ` -"expect(received).toBe(expected) +expect(received).toBe(expected) Expected value to be (using ===): - {\\"a\\": 5} + {"a": 5} Received: - {\\"a\\": 1} + {"a": 1} Difference: @@ -269,13 +269,13 @@ Difference: + Received Object { -- \\"a\\": 5, -+ \\"a\\": 1, - }" +- "a": 5, ++ "a": 1, + } `; exports[`.toBe() fails for: {} and {} 1`] = ` -"expect(received).toBe(expected) +expect(received).toBe(expected) Expected value to be (using ===): {} @@ -284,20 +284,20 @@ Received: Difference: -Compared values have no visual difference." +Compared values have no visual difference. `; exports[`.toBe() fails for: 1 and 2 1`] = ` -"expect(received).toBe(expected) +expect(received).toBe(expected) Expected value to be (using ===): 2 Received: - 1" + 1 `; exports[`.toBe() fails for: null and undefined 1`] = ` -"expect(received).toBe(expected) +expect(received).toBe(expected) Expected value to be (using ===): undefined @@ -306,1656 +306,1656 @@ Received: Difference: - Comparing two different types of values. Expected undefined but received null." + Comparing two different types of values. Expected undefined but received null. `; exports[`.toBe() fails for: true and false 1`] = ` -"expect(received).toBe(expected) +expect(received).toBe(expected) Expected value to be (using ===): false Received: - true" + true `; exports[`.toBeCloseTo() {pass: true} expect(0)toBeCloseTo( 0) 1`] = ` -"expect(received).not.toBeCloseTo(expected, precision) +expect(received).not.toBeCloseTo(expected, precision) Expected value not to be close to (with 2-digit precision): 0 Received: - 0" + 0 `; exports[`.toBeCloseTo() {pass: true} expect(0)toBeCloseTo( 0.001) 1`] = ` -"expect(received).not.toBeCloseTo(expected, precision) +expect(received).not.toBeCloseTo(expected, precision) Expected value not to be close to (with 2-digit precision): 0.001 Received: - 0" + 0 `; exports[`.toBeCloseTo() {pass: true} expect(1.23)toBeCloseTo( 1.225) 1`] = ` -"expect(received).not.toBeCloseTo(expected, precision) +expect(received).not.toBeCloseTo(expected, precision) Expected value not to be close to (with 2-digit precision): 1.225 Received: - 1.23" + 1.23 `; exports[`.toBeCloseTo() {pass: true} expect(1.23)toBeCloseTo( 1.226) 1`] = ` -"expect(received).not.toBeCloseTo(expected, precision) +expect(received).not.toBeCloseTo(expected, precision) Expected value not to be close to (with 2-digit precision): 1.226 Received: - 1.23" + 1.23 `; exports[`.toBeCloseTo() {pass: true} expect(1.23)toBeCloseTo( 1.229) 1`] = ` -"expect(received).not.toBeCloseTo(expected, precision) +expect(received).not.toBeCloseTo(expected, precision) Expected value not to be close to (with 2-digit precision): 1.229 Received: - 1.23" + 1.23 `; exports[`.toBeCloseTo() {pass: true} expect(1.23)toBeCloseTo( 1.234) 1`] = ` -"expect(received).not.toBeCloseTo(expected, precision) +expect(received).not.toBeCloseTo(expected, precision) Expected value not to be close to (with 2-digit precision): 1.234 Received: - 1.23" + 1.23 `; exports[`.toBeCloseTo() accepts an optional precision argument: [0, 0.000004, 5] 1`] = ` -"expect(received).not.toBeCloseTo(expected, precision) +expect(received).not.toBeCloseTo(expected, precision) Expected value not to be close to (with 5-digit precision): 0.000004 Received: - 0" + 0 `; exports[`.toBeCloseTo() accepts an optional precision argument: [0, 0.0001, 3] 1`] = ` -"expect(received).not.toBeCloseTo(expected, precision) +expect(received).not.toBeCloseTo(expected, precision) Expected value not to be close to (with 3-digit precision): 0.0001 Received: - 0" + 0 `; exports[`.toBeCloseTo() accepts an optional precision argument: [0, 0.1, 0] 1`] = ` -"expect(received).not.toBeCloseTo(expected, precision) +expect(received).not.toBeCloseTo(expected, precision) Expected value not to be close to (with 0-digit precision): 0.1 Received: - 0" + 0 `; exports[`.toBeCloseTo() throws: [0, 0.01] 1`] = ` -"expect(received).toBeCloseTo(expected, precision) +expect(received).toBeCloseTo(expected, precision) Expected value to be close to (with 2-digit precision): 0.01 Received: - 0" + 0 `; exports[`.toBeCloseTo() throws: [1, 1.23] 1`] = ` -"expect(received).toBeCloseTo(expected, precision) +expect(received).toBeCloseTo(expected, precision) Expected value to be close to (with 2-digit precision): 1.23 Received: - 1" + 1 `; exports[`.toBeCloseTo() throws: [1.23, 1.2249999] 1`] = ` -"expect(received).toBeCloseTo(expected, precision) +expect(received).toBeCloseTo(expected, precision) Expected value to be close to (with 2-digit precision): 1.2249999 Received: - 1.23" + 1.23 `; exports[`.toBeDefined(), .toBeUndefined() '"a"' is defined 1`] = ` -"expect(received).not.toBeDefined() +expect(received).not.toBeDefined() Expected value not to be defined, instead received - \\"a\\"" + "a" `; exports[`.toBeDefined(), .toBeUndefined() '"a"' is defined 2`] = ` -"expect(received).toBeUndefined() +expect(received).toBeUndefined() Expected value to be undefined, instead received - \\"a\\"" + "a" `; exports[`.toBeDefined(), .toBeUndefined() '[]' is defined 1`] = ` -"expect(received).not.toBeDefined() +expect(received).not.toBeDefined() Expected value not to be defined, instead received - []" + [] `; exports[`.toBeDefined(), .toBeUndefined() '[]' is defined 2`] = ` -"expect(received).toBeUndefined() +expect(received).toBeUndefined() Expected value to be undefined, instead received - []" + [] `; exports[`.toBeDefined(), .toBeUndefined() '[Function anonymous]' is defined 1`] = ` -"expect(received).not.toBeDefined() +expect(received).not.toBeDefined() Expected value not to be defined, instead received - [Function anonymous]" + [Function anonymous] `; exports[`.toBeDefined(), .toBeUndefined() '[Function anonymous]' is defined 2`] = ` -"expect(received).toBeUndefined() +expect(received).toBeUndefined() Expected value to be undefined, instead received - [Function anonymous]" + [Function anonymous] `; exports[`.toBeDefined(), .toBeUndefined() '{}' is defined 1`] = ` -"expect(received).not.toBeDefined() +expect(received).not.toBeDefined() Expected value not to be defined, instead received - {}" + {} `; exports[`.toBeDefined(), .toBeUndefined() '{}' is defined 2`] = ` -"expect(received).toBeUndefined() +expect(received).toBeUndefined() Expected value to be undefined, instead received - {}" + {} `; exports[`.toBeDefined(), .toBeUndefined() '0.5' is defined 1`] = ` -"expect(received).not.toBeDefined() +expect(received).not.toBeDefined() Expected value not to be defined, instead received - 0.5" + 0.5 `; exports[`.toBeDefined(), .toBeUndefined() '0.5' is defined 2`] = ` -"expect(received).toBeUndefined() +expect(received).toBeUndefined() Expected value to be undefined, instead received - 0.5" + 0.5 `; exports[`.toBeDefined(), .toBeUndefined() '1' is defined 1`] = ` -"expect(received).not.toBeDefined() +expect(received).not.toBeDefined() Expected value not to be defined, instead received - 1" + 1 `; exports[`.toBeDefined(), .toBeUndefined() '1' is defined 2`] = ` -"expect(received).toBeUndefined() +expect(received).toBeUndefined() Expected value to be undefined, instead received - 1" + 1 `; exports[`.toBeDefined(), .toBeUndefined() 'Infinity' is defined 1`] = ` -"expect(received).not.toBeDefined() +expect(received).not.toBeDefined() Expected value not to be defined, instead received - Infinity" + Infinity `; exports[`.toBeDefined(), .toBeUndefined() 'Infinity' is defined 2`] = ` -"expect(received).toBeUndefined() +expect(received).toBeUndefined() Expected value to be undefined, instead received - Infinity" + Infinity `; exports[`.toBeDefined(), .toBeUndefined() 'Map {}' is defined 1`] = ` -"expect(received).not.toBeDefined() +expect(received).not.toBeDefined() Expected value not to be defined, instead received - Map {}" + Map {} `; exports[`.toBeDefined(), .toBeUndefined() 'Map {}' is defined 2`] = ` -"expect(received).toBeUndefined() +expect(received).toBeUndefined() Expected value to be undefined, instead received - Map {}" + Map {} `; exports[`.toBeDefined(), .toBeUndefined() 'true' is defined 1`] = ` -"expect(received).not.toBeDefined() +expect(received).not.toBeDefined() Expected value not to be defined, instead received - true" + true `; exports[`.toBeDefined(), .toBeUndefined() 'true' is defined 2`] = ` -"expect(received).toBeUndefined() +expect(received).toBeUndefined() Expected value to be undefined, instead received - true" + true `; exports[`.toBeDefined(), .toBeUndefined() undefined is undefined 1`] = ` -"expect(received).toBeDefined() +expect(received).toBeDefined() Expected value to be defined, instead received - undefined" + undefined `; exports[`.toBeDefined(), .toBeUndefined() undefined is undefined 2`] = ` -"expect(received).not.toBeUndefined() +expect(received).not.toBeUndefined() Expected value not to be undefined, instead received - undefined" + undefined `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() equal numbers: [-Infinity, -Infinity] 1`] = ` -"expect(received).not.toBeGreaterThanOrEqual(expected) +expect(received).not.toBeGreaterThanOrEqual(expected) Expected value not to be greater than or equal: -Infinity Received: - -Infinity" + -Infinity `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() equal numbers: [-Infinity, -Infinity] 2`] = ` -"expect(received).not.toBeLessThanOrEqual(expected) +expect(received).not.toBeLessThanOrEqual(expected) Expected value not to be less than or equal: -Infinity Received: - -Infinity" + -Infinity `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() equal numbers: [1, 1] 1`] = ` -"expect(received).not.toBeGreaterThanOrEqual(expected) +expect(received).not.toBeGreaterThanOrEqual(expected) Expected value not to be greater than or equal: 1 Received: - 1" + 1 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() equal numbers: [1, 1] 2`] = ` -"expect(received).not.toBeLessThanOrEqual(expected) +expect(received).not.toBeLessThanOrEqual(expected) Expected value not to be less than or equal: 1 Received: - 1" + 1 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() equal numbers: [1.7976931348623157e+308, 1.7976931348623157e+308] 1`] = ` -"expect(received).not.toBeGreaterThanOrEqual(expected) +expect(received).not.toBeGreaterThanOrEqual(expected) Expected value not to be greater than or equal: 1.7976931348623157e+308 Received: - 1.7976931348623157e+308" + 1.7976931348623157e+308 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() equal numbers: [1.7976931348623157e+308, 1.7976931348623157e+308] 2`] = ` -"expect(received).not.toBeLessThanOrEqual(expected) +expect(received).not.toBeLessThanOrEqual(expected) Expected value not to be less than or equal: 1.7976931348623157e+308 Received: - 1.7976931348623157e+308" + 1.7976931348623157e+308 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() equal numbers: [5e-324, 5e-324] 1`] = ` -"expect(received).not.toBeGreaterThanOrEqual(expected) +expect(received).not.toBeGreaterThanOrEqual(expected) Expected value not to be greater than or equal: 5e-324 Received: - 5e-324" + 5e-324 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() equal numbers: [5e-324, 5e-324] 2`] = ` -"expect(received).not.toBeLessThanOrEqual(expected) +expect(received).not.toBeLessThanOrEqual(expected) Expected value not to be less than or equal: 5e-324 Received: - 5e-324" + 5e-324 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() equal numbers: [Infinity, Infinity] 1`] = ` -"expect(received).not.toBeGreaterThanOrEqual(expected) +expect(received).not.toBeGreaterThanOrEqual(expected) Expected value not to be greater than or equal: Infinity Received: - Infinity" + Infinity `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() equal numbers: [Infinity, Infinity] 2`] = ` -"expect(received).not.toBeLessThanOrEqual(expected) +expect(received).not.toBeLessThanOrEqual(expected) Expected value not to be less than or equal: Infinity Received: - Infinity" + Infinity `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [-Infinity, Infinity] 1`] = ` -"expect(received).toBeGreaterThan(expected) +expect(received).toBeGreaterThan(expected) Expected value to be greater than: Infinity Received: - -Infinity" + -Infinity `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [-Infinity, Infinity] 2`] = ` -"expect(received).not.toBeLessThan(expected) +expect(received).not.toBeLessThan(expected) Expected value not to be less than: Infinity Received: - -Infinity" + -Infinity `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [-Infinity, Infinity] 3`] = ` -"expect(received).not.toBeGreaterThan(expected) +expect(received).not.toBeGreaterThan(expected) Expected value not to be greater than: -Infinity Received: - Infinity" + Infinity `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [-Infinity, Infinity] 4`] = ` -"expect(received).toBeLessThan(expected) +expect(received).toBeLessThan(expected) Expected value to be less than: -Infinity Received: - Infinity" + Infinity `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [-Infinity, Infinity] 5`] = ` -"expect(received).toBeGreaterThanOrEqual(expected) +expect(received).toBeGreaterThanOrEqual(expected) Expected value to be greater than or equal: Infinity Received: - -Infinity" + -Infinity `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [-Infinity, Infinity] 6`] = ` -"expect(received).not.toBeLessThanOrEqual(expected) +expect(received).not.toBeLessThanOrEqual(expected) Expected value not to be less than or equal: Infinity Received: - -Infinity" + -Infinity `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [-Infinity, Infinity] 7`] = ` -"expect(received).not.toBeGreaterThanOrEqual(expected) +expect(received).not.toBeGreaterThanOrEqual(expected) Expected value not to be greater than or equal: -Infinity Received: - Infinity" + Infinity `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [-Infinity, Infinity] 8`] = ` -"expect(received).toBeLessThanOrEqual(expected) +expect(received).toBeLessThanOrEqual(expected) Expected value to be less than or equal: -Infinity Received: - Infinity" + Infinity `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [0.1, 0.2] 1`] = ` -"expect(received).toBeGreaterThan(expected) +expect(received).toBeGreaterThan(expected) Expected value to be greater than: 0.2 Received: - 0.1" + 0.1 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [0.1, 0.2] 2`] = ` -"expect(received).not.toBeLessThan(expected) +expect(received).not.toBeLessThan(expected) Expected value not to be less than: 0.2 Received: - 0.1" + 0.1 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [0.1, 0.2] 3`] = ` -"expect(received).not.toBeGreaterThan(expected) +expect(received).not.toBeGreaterThan(expected) Expected value not to be greater than: 0.1 Received: - 0.2" + 0.2 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [0.1, 0.2] 4`] = ` -"expect(received).toBeLessThan(expected) +expect(received).toBeLessThan(expected) Expected value to be less than: 0.1 Received: - 0.2" + 0.2 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [0.1, 0.2] 5`] = ` -"expect(received).toBeGreaterThanOrEqual(expected) +expect(received).toBeGreaterThanOrEqual(expected) Expected value to be greater than or equal: 0.2 Received: - 0.1" + 0.1 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [0.1, 0.2] 6`] = ` -"expect(received).not.toBeLessThanOrEqual(expected) +expect(received).not.toBeLessThanOrEqual(expected) Expected value not to be less than or equal: 0.2 Received: - 0.1" + 0.1 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [0.1, 0.2] 7`] = ` -"expect(received).not.toBeGreaterThanOrEqual(expected) +expect(received).not.toBeGreaterThanOrEqual(expected) Expected value not to be greater than or equal: 0.1 Received: - 0.2" + 0.2 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [0.1, 0.2] 8`] = ` -"expect(received).toBeLessThanOrEqual(expected) +expect(received).toBeLessThanOrEqual(expected) Expected value to be less than or equal: 0.1 Received: - 0.2" + 0.2 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [1, 2] 1`] = ` -"expect(received).toBeGreaterThan(expected) +expect(received).toBeGreaterThan(expected) Expected value to be greater than: 2 Received: - 1" + 1 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [1, 2] 2`] = ` -"expect(received).not.toBeLessThan(expected) +expect(received).not.toBeLessThan(expected) Expected value not to be less than: 2 Received: - 1" + 1 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [1, 2] 3`] = ` -"expect(received).not.toBeGreaterThan(expected) +expect(received).not.toBeGreaterThan(expected) Expected value not to be greater than: 1 Received: - 2" + 2 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [1, 2] 4`] = ` -"expect(received).toBeLessThan(expected) +expect(received).toBeLessThan(expected) Expected value to be less than: 1 Received: - 2" + 2 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [1, 2] 5`] = ` -"expect(received).toBeGreaterThanOrEqual(expected) +expect(received).toBeGreaterThanOrEqual(expected) Expected value to be greater than or equal: 2 Received: - 1" + 1 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [1, 2] 6`] = ` -"expect(received).not.toBeLessThanOrEqual(expected) +expect(received).not.toBeLessThanOrEqual(expected) Expected value not to be less than or equal: 2 Received: - 1" + 1 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [1, 2] 7`] = ` -"expect(received).not.toBeGreaterThanOrEqual(expected) +expect(received).not.toBeGreaterThanOrEqual(expected) Expected value not to be greater than or equal: 1 Received: - 2" + 2 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [1, 2] 8`] = ` -"expect(received).toBeLessThanOrEqual(expected) +expect(received).toBeLessThanOrEqual(expected) Expected value to be less than or equal: 1 Received: - 2" + 2 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [3, 7] 1`] = ` -"expect(received).toBeGreaterThan(expected) +expect(received).toBeGreaterThan(expected) Expected value to be greater than: 7 Received: - 3" + 3 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [3, 7] 2`] = ` -"expect(received).not.toBeLessThan(expected) +expect(received).not.toBeLessThan(expected) Expected value not to be less than: 7 Received: - 3" + 3 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [3, 7] 3`] = ` -"expect(received).not.toBeGreaterThan(expected) +expect(received).not.toBeGreaterThan(expected) Expected value not to be greater than: 3 Received: - 7" + 7 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [3, 7] 4`] = ` -"expect(received).toBeLessThan(expected) +expect(received).toBeLessThan(expected) Expected value to be less than: 3 Received: - 7" + 7 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [3, 7] 5`] = ` -"expect(received).toBeGreaterThanOrEqual(expected) +expect(received).toBeGreaterThanOrEqual(expected) Expected value to be greater than or equal: 7 Received: - 3" + 3 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [3, 7] 6`] = ` -"expect(received).not.toBeLessThanOrEqual(expected) +expect(received).not.toBeLessThanOrEqual(expected) Expected value not to be less than or equal: 7 Received: - 3" + 3 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [3, 7] 7`] = ` -"expect(received).not.toBeGreaterThanOrEqual(expected) +expect(received).not.toBeGreaterThanOrEqual(expected) Expected value not to be greater than or equal: 3 Received: - 7" + 7 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [3, 7] 8`] = ` -"expect(received).toBeLessThanOrEqual(expected) +expect(received).toBeLessThanOrEqual(expected) Expected value to be less than or equal: 3 Received: - 7" + 7 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [5e-324, 1.7976931348623157e+308] 1`] = ` -"expect(received).toBeGreaterThan(expected) +expect(received).toBeGreaterThan(expected) Expected value to be greater than: 1.7976931348623157e+308 Received: - 5e-324" + 5e-324 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [5e-324, 1.7976931348623157e+308] 2`] = ` -"expect(received).not.toBeLessThan(expected) +expect(received).not.toBeLessThan(expected) Expected value not to be less than: 1.7976931348623157e+308 Received: - 5e-324" + 5e-324 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [5e-324, 1.7976931348623157e+308] 3`] = ` -"expect(received).not.toBeGreaterThan(expected) +expect(received).not.toBeGreaterThan(expected) Expected value not to be greater than: 5e-324 Received: - 1.7976931348623157e+308" + 1.7976931348623157e+308 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [5e-324, 1.7976931348623157e+308] 4`] = ` -"expect(received).toBeLessThan(expected) +expect(received).toBeLessThan(expected) Expected value to be less than: 5e-324 Received: - 1.7976931348623157e+308" + 1.7976931348623157e+308 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [5e-324, 1.7976931348623157e+308] 5`] = ` -"expect(received).toBeGreaterThanOrEqual(expected) +expect(received).toBeGreaterThanOrEqual(expected) Expected value to be greater than or equal: 1.7976931348623157e+308 Received: - 5e-324" + 5e-324 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [5e-324, 1.7976931348623157e+308] 6`] = ` -"expect(received).not.toBeLessThanOrEqual(expected) +expect(received).not.toBeLessThanOrEqual(expected) Expected value not to be less than or equal: 1.7976931348623157e+308 Received: - 5e-324" + 5e-324 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [5e-324, 1.7976931348623157e+308] 7`] = ` -"expect(received).not.toBeGreaterThanOrEqual(expected) +expect(received).not.toBeGreaterThanOrEqual(expected) Expected value not to be greater than or equal: 5e-324 Received: - 1.7976931348623157e+308" + 1.7976931348623157e+308 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [5e-324, 1.7976931348623157e+308] 8`] = ` -"expect(received).toBeLessThanOrEqual(expected) +expect(received).toBeLessThanOrEqual(expected) Expected value to be less than or equal: 5e-324 Received: - 1.7976931348623157e+308" + 1.7976931348623157e+308 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [9, 18] 1`] = ` -"expect(received).toBeGreaterThan(expected) +expect(received).toBeGreaterThan(expected) Expected value to be greater than: 18 Received: - 9" + 9 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [9, 18] 2`] = ` -"expect(received).not.toBeLessThan(expected) +expect(received).not.toBeLessThan(expected) Expected value not to be less than: 18 Received: - 9" + 9 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [9, 18] 3`] = ` -"expect(received).not.toBeGreaterThan(expected) +expect(received).not.toBeGreaterThan(expected) Expected value not to be greater than: 9 Received: - 18" + 18 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [9, 18] 4`] = ` -"expect(received).toBeLessThan(expected) +expect(received).toBeLessThan(expected) Expected value to be less than: 9 Received: - 18" + 18 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [9, 18] 5`] = ` -"expect(received).toBeGreaterThanOrEqual(expected) +expect(received).toBeGreaterThanOrEqual(expected) Expected value to be greater than or equal: 18 Received: - 9" + 9 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [9, 18] 6`] = ` -"expect(received).not.toBeLessThanOrEqual(expected) +expect(received).not.toBeLessThanOrEqual(expected) Expected value not to be less than or equal: 18 Received: - 9" + 9 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [9, 18] 7`] = ` -"expect(received).not.toBeGreaterThanOrEqual(expected) +expect(received).not.toBeGreaterThanOrEqual(expected) Expected value not to be greater than or equal: 9 Received: - 18" + 18 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [9, 18] 8`] = ` -"expect(received).toBeLessThanOrEqual(expected) +expect(received).toBeLessThanOrEqual(expected) Expected value to be less than or equal: 9 Received: - 18" + 18 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [17, 34] 1`] = ` -"expect(received).toBeGreaterThan(expected) +expect(received).toBeGreaterThan(expected) Expected value to be greater than: 34 Received: - 17" + 17 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [17, 34] 2`] = ` -"expect(received).not.toBeLessThan(expected) +expect(received).not.toBeLessThan(expected) Expected value not to be less than: 34 Received: - 17" + 17 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [17, 34] 3`] = ` -"expect(received).not.toBeGreaterThan(expected) +expect(received).not.toBeGreaterThan(expected) Expected value not to be greater than: 17 Received: - 34" + 34 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [17, 34] 4`] = ` -"expect(received).toBeLessThan(expected) +expect(received).toBeLessThan(expected) Expected value to be less than: 17 Received: - 34" + 34 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [17, 34] 5`] = ` -"expect(received).toBeGreaterThanOrEqual(expected) +expect(received).toBeGreaterThanOrEqual(expected) Expected value to be greater than or equal: 34 Received: - 17" + 17 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [17, 34] 6`] = ` -"expect(received).not.toBeLessThanOrEqual(expected) +expect(received).not.toBeLessThanOrEqual(expected) Expected value not to be less than or equal: 34 Received: - 17" + 17 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [17, 34] 7`] = ` -"expect(received).not.toBeGreaterThanOrEqual(expected) +expect(received).not.toBeGreaterThanOrEqual(expected) Expected value not to be greater than or equal: 17 Received: - 34" + 34 `; exports[`.toBeGreaterThan(), .toBeLessThan(), .toBeGreaterThanOrEqual(), .toBeLessThanOrEqual() throws: [17, 34] 8`] = ` -"expect(received).toBeLessThanOrEqual(expected) +expect(received).toBeLessThanOrEqual(expected) Expected value to be less than or equal: 17 Received: - 34" + 34 `; exports[`.toBeInstanceOf() failing "a" and [Function String] 1`] = ` -"expect(value).toBeInstanceOf(constructor) +expect(value).toBeInstanceOf(constructor) Expected value to be an instance of: - \\"String\\" + "String" Received: - \\"a\\" + "a" Constructor: - \\"String\\"" + "String" `; exports[`.toBeInstanceOf() failing {} and [Function A] 1`] = ` -"expect(value).toBeInstanceOf(constructor) +expect(value).toBeInstanceOf(constructor) Expected value to be an instance of: - \\"A\\" + "A" Received: {} Constructor: - undefined" + undefined `; exports[`.toBeInstanceOf() failing {} and [Function B] 1`] = ` -"expect(value).toBeInstanceOf(constructor) +expect(value).toBeInstanceOf(constructor) Expected value to be an instance of: - \\"B\\" + "B" Received: {} Constructor: - \\"A\\"" + "A" `; exports[`.toBeInstanceOf() failing 1 and [Function Number] 1`] = ` -"expect(value).toBeInstanceOf(constructor) +expect(value).toBeInstanceOf(constructor) Expected value to be an instance of: - \\"Number\\" + "Number" Received: 1 Constructor: - \\"Number\\"" + "Number" `; exports[`.toBeInstanceOf() failing true and [Function Boolean] 1`] = ` -"expect(value).toBeInstanceOf(constructor) +expect(value).toBeInstanceOf(constructor) Expected value to be an instance of: - \\"Boolean\\" + "Boolean" Received: true Constructor: - \\"Boolean\\"" + "Boolean" `; exports[`.toBeInstanceOf() passing [] and [Function Array] 1`] = ` -"expect(value).not.toBeInstanceOf(constructor) +expect(value).not.toBeInstanceOf(constructor) Expected value not to be an instance of: - \\"Array\\" + "Array" Received: [] -" + `; exports[`.toBeInstanceOf() passing {} and [Function A] 1`] = ` -"expect(value).not.toBeInstanceOf(constructor) +expect(value).not.toBeInstanceOf(constructor) Expected value not to be an instance of: - \\"A\\" + "A" Received: {} -" + `; exports[`.toBeInstanceOf() passing Map {} and [Function Map] 1`] = ` -"expect(value).not.toBeInstanceOf(constructor) +expect(value).not.toBeInstanceOf(constructor) Expected value not to be an instance of: - \\"Map\\" + "Map" Received: Map {} -" + `; exports[`.toBeInstanceOf() throws if constructor is not a function 1`] = ` -"expect(value)[.not].toBeInstanceOf(constructor) +expect(value)[.not].toBeInstanceOf(constructor) Expected constructor to be a function. Instead got: - \\"number\\"" + "number" `; exports[`.toBeNaN() {pass: true} expect(NaN).toBeNaN() 1`] = ` -"expect(received).not.toBeNaN() +expect(received).not.toBeNaN() Expected value not to be NaN, instead received - NaN" + NaN `; exports[`.toBeNaN() {pass: true} expect(NaN).toBeNaN() 2`] = ` -"expect(received).not.toBeNaN() +expect(received).not.toBeNaN() Expected value not to be NaN, instead received - NaN" + NaN `; exports[`.toBeNaN() {pass: true} expect(NaN).toBeNaN() 3`] = ` -"expect(received).not.toBeNaN() +expect(received).not.toBeNaN() Expected value not to be NaN, instead received - NaN" + NaN `; exports[`.toBeNaN() {pass: true} expect(NaN).toBeNaN() 4`] = ` -"expect(received).not.toBeNaN() +expect(received).not.toBeNaN() Expected value not to be NaN, instead received - NaN" + NaN `; exports[`.toBeNaN() throws 1`] = ` -"expect(received).toBeNaN() +expect(received).toBeNaN() Expected value to be NaN, instead received - 1" + 1 `; exports[`.toBeNaN() throws 2`] = ` -"expect(received).toBeNaN() +expect(received).toBeNaN() Expected value to be NaN, instead received - \\"\\"" + "" `; exports[`.toBeNaN() throws 3`] = ` -"expect(received).toBeNaN() +expect(received).toBeNaN() Expected value to be NaN, instead received - null" + null `; exports[`.toBeNaN() throws 4`] = ` -"expect(received).toBeNaN() +expect(received).toBeNaN() Expected value to be NaN, instead received - undefined" + undefined `; exports[`.toBeNaN() throws 5`] = ` -"expect(received).toBeNaN() +expect(received).toBeNaN() Expected value to be NaN, instead received - {}" + {} `; exports[`.toBeNaN() throws 6`] = ` -"expect(received).toBeNaN() +expect(received).toBeNaN() Expected value to be NaN, instead received - []" + [] `; exports[`.toBeNaN() throws 7`] = ` -"expect(received).toBeNaN() +expect(received).toBeNaN() Expected value to be NaN, instead received - 0.2" + 0.2 `; exports[`.toBeNaN() throws 8`] = ` -"expect(received).toBeNaN() +expect(received).toBeNaN() Expected value to be NaN, instead received - 0" + 0 `; exports[`.toBeNaN() throws 9`] = ` -"expect(received).toBeNaN() +expect(received).toBeNaN() Expected value to be NaN, instead received - Infinity" + Infinity `; exports[`.toBeNaN() throws 10`] = ` -"expect(received).toBeNaN() +expect(received).toBeNaN() Expected value to be NaN, instead received - -Infinity" + -Infinity `; exports[`.toBeNull() fails for '"a"' with .not 1`] = ` -"expect(received).toBeNull() +expect(received).toBeNull() Expected value to be null, instead received - \\"a\\"" + "a" `; exports[`.toBeNull() fails for '[]' with .not 1`] = ` -"expect(received).toBeNull() +expect(received).toBeNull() Expected value to be null, instead received - []" + [] `; exports[`.toBeNull() fails for '[Function anonymous]' with .not 1`] = ` -"expect(received).toBeNull() +expect(received).toBeNull() Expected value to be null, instead received - [Function anonymous]" + [Function anonymous] `; exports[`.toBeNull() fails for '{}' with .not 1`] = ` -"expect(received).toBeNull() +expect(received).toBeNull() Expected value to be null, instead received - {}" + {} `; exports[`.toBeNull() fails for '0.5' with .not 1`] = ` -"expect(received).toBeNull() +expect(received).toBeNull() Expected value to be null, instead received - 0.5" + 0.5 `; exports[`.toBeNull() fails for '1' with .not 1`] = ` -"expect(received).toBeNull() +expect(received).toBeNull() Expected value to be null, instead received - 1" + 1 `; exports[`.toBeNull() fails for 'Infinity' with .not 1`] = ` -"expect(received).toBeNull() +expect(received).toBeNull() Expected value to be null, instead received - Infinity" + Infinity `; exports[`.toBeNull() fails for 'Map {}' with .not 1`] = ` -"expect(received).toBeNull() +expect(received).toBeNull() Expected value to be null, instead received - Map {}" + Map {} `; exports[`.toBeNull() fails for 'true' with .not 1`] = ` -"expect(received).toBeNull() +expect(received).toBeNull() Expected value to be null, instead received - true" + true `; exports[`.toBeNull() pass for null 1`] = ` -"expect(received).not.toBeNull() +expect(received).not.toBeNull() Expected value not to be null, instead received - null" + null `; exports[`.toBeTruthy(), .toBeFalsy() '""' is falsy 1`] = ` -"expect(received).toBeTruthy() +expect(received).toBeTruthy() Expected value to be truthy, instead received - \\"\\"" + "" `; exports[`.toBeTruthy(), .toBeFalsy() '""' is falsy 2`] = ` -"expect(received).not.toBeFalsy() +expect(received).not.toBeFalsy() Expected value not to be falsy, instead received - \\"\\"" + "" `; exports[`.toBeTruthy(), .toBeFalsy() '"a"' is truthy 1`] = ` -"expect(received).not.toBeTruthy() +expect(received).not.toBeTruthy() Expected value not to be truthy, instead received - \\"a\\"" + "a" `; exports[`.toBeTruthy(), .toBeFalsy() '"a"' is truthy 2`] = ` -"expect(received).toBeFalsy() +expect(received).toBeFalsy() Expected value to be falsy, instead received - \\"a\\"" + "a" `; exports[`.toBeTruthy(), .toBeFalsy() '[]' is truthy 1`] = ` -"expect(received).not.toBeTruthy() +expect(received).not.toBeTruthy() Expected value not to be truthy, instead received - []" + [] `; exports[`.toBeTruthy(), .toBeFalsy() '[]' is truthy 2`] = ` -"expect(received).toBeFalsy() +expect(received).toBeFalsy() Expected value to be falsy, instead received - []" + [] `; exports[`.toBeTruthy(), .toBeFalsy() '[Function anonymous]' is truthy 1`] = ` -"expect(received).not.toBeTruthy() +expect(received).not.toBeTruthy() Expected value not to be truthy, instead received - [Function anonymous]" + [Function anonymous] `; exports[`.toBeTruthy(), .toBeFalsy() '[Function anonymous]' is truthy 2`] = ` -"expect(received).toBeFalsy() +expect(received).toBeFalsy() Expected value to be falsy, instead received - [Function anonymous]" + [Function anonymous] `; exports[`.toBeTruthy(), .toBeFalsy() '{}' is truthy 1`] = ` -"expect(received).not.toBeTruthy() +expect(received).not.toBeTruthy() Expected value not to be truthy, instead received - {}" + {} `; exports[`.toBeTruthy(), .toBeFalsy() '{}' is truthy 2`] = ` -"expect(received).toBeFalsy() +expect(received).toBeFalsy() Expected value to be falsy, instead received - {}" + {} `; exports[`.toBeTruthy(), .toBeFalsy() '0' is falsy 1`] = ` -"expect(received).toBeTruthy() +expect(received).toBeTruthy() Expected value to be truthy, instead received - 0" + 0 `; exports[`.toBeTruthy(), .toBeFalsy() '0' is falsy 2`] = ` -"expect(received).not.toBeFalsy() +expect(received).not.toBeFalsy() Expected value not to be falsy, instead received - 0" + 0 `; exports[`.toBeTruthy(), .toBeFalsy() '0.5' is truthy 1`] = ` -"expect(received).not.toBeTruthy() +expect(received).not.toBeTruthy() Expected value not to be truthy, instead received - 0.5" + 0.5 `; exports[`.toBeTruthy(), .toBeFalsy() '0.5' is truthy 2`] = ` -"expect(received).toBeFalsy() +expect(received).toBeFalsy() Expected value to be falsy, instead received - 0.5" + 0.5 `; exports[`.toBeTruthy(), .toBeFalsy() '1' is truthy 1`] = ` -"expect(received).not.toBeTruthy() +expect(received).not.toBeTruthy() Expected value not to be truthy, instead received - 1" + 1 `; exports[`.toBeTruthy(), .toBeFalsy() '1' is truthy 2`] = ` -"expect(received).toBeFalsy() +expect(received).toBeFalsy() Expected value to be falsy, instead received - 1" + 1 `; exports[`.toBeTruthy(), .toBeFalsy() 'Infinity' is truthy 1`] = ` -"expect(received).not.toBeTruthy() +expect(received).not.toBeTruthy() Expected value not to be truthy, instead received - Infinity" + Infinity `; exports[`.toBeTruthy(), .toBeFalsy() 'Infinity' is truthy 2`] = ` -"expect(received).toBeFalsy() +expect(received).toBeFalsy() Expected value to be falsy, instead received - Infinity" + Infinity `; exports[`.toBeTruthy(), .toBeFalsy() 'Map {}' is truthy 1`] = ` -"expect(received).not.toBeTruthy() +expect(received).not.toBeTruthy() Expected value not to be truthy, instead received - Map {}" + Map {} `; exports[`.toBeTruthy(), .toBeFalsy() 'Map {}' is truthy 2`] = ` -"expect(received).toBeFalsy() +expect(received).toBeFalsy() Expected value to be falsy, instead received - Map {}" + Map {} `; exports[`.toBeTruthy(), .toBeFalsy() 'NaN' is falsy 1`] = ` -"expect(received).toBeTruthy() +expect(received).toBeTruthy() Expected value to be truthy, instead received - NaN" + NaN `; exports[`.toBeTruthy(), .toBeFalsy() 'NaN' is falsy 2`] = ` -"expect(received).not.toBeFalsy() +expect(received).not.toBeFalsy() Expected value not to be falsy, instead received - NaN" + NaN `; exports[`.toBeTruthy(), .toBeFalsy() 'false' is falsy 1`] = ` -"expect(received).toBeTruthy() +expect(received).toBeTruthy() Expected value to be truthy, instead received - false" + false `; exports[`.toBeTruthy(), .toBeFalsy() 'false' is falsy 2`] = ` -"expect(received).not.toBeFalsy() +expect(received).not.toBeFalsy() Expected value not to be falsy, instead received - false" + false `; exports[`.toBeTruthy(), .toBeFalsy() 'null' is falsy 1`] = ` -"expect(received).toBeTruthy() +expect(received).toBeTruthy() Expected value to be truthy, instead received - null" + null `; exports[`.toBeTruthy(), .toBeFalsy() 'null' is falsy 2`] = ` -"expect(received).not.toBeFalsy() +expect(received).not.toBeFalsy() Expected value not to be falsy, instead received - null" + null `; exports[`.toBeTruthy(), .toBeFalsy() 'true' is truthy 1`] = ` -"expect(received).not.toBeTruthy() +expect(received).not.toBeTruthy() Expected value not to be truthy, instead received - true" + true `; exports[`.toBeTruthy(), .toBeFalsy() 'true' is truthy 2`] = ` -"expect(received).toBeFalsy() +expect(received).toBeFalsy() Expected value to be falsy, instead received - true" + true `; exports[`.toBeTruthy(), .toBeFalsy() 'undefined' is falsy 1`] = ` -"expect(received).toBeTruthy() +expect(received).toBeTruthy() Expected value to be truthy, instead received - undefined" + undefined `; exports[`.toBeTruthy(), .toBeFalsy() 'undefined' is falsy 2`] = ` -"expect(received).not.toBeFalsy() +expect(received).not.toBeFalsy() Expected value not to be falsy, instead received - undefined" + undefined `; exports[`.toBeTruthy(), .toBeFalsy() does not accept arguments 1`] = ` -"expect(received)[.not].toBeTruthy() +expect(received)[.not].toBeTruthy() Matcher does not accept any arguments. -Got: null" +Got: null `; exports[`.toBeTruthy(), .toBeFalsy() does not accept arguments 2`] = ` -"expect(received)[.not].toBeFalsy() +expect(received)[.not].toBeFalsy() Matcher does not accept any arguments. -Got: null" +Got: null `; exports[`.toContain(), .toContainEqual() '"11112111"' contains '"2"' 1`] = ` -"expect(string).not.toContain(value) +expect(string).not.toContain(value) Expected string: - \\"11112111\\" + "11112111" Not to contain value: - \\"2\\" -" + "2" + `; exports[`.toContain(), .toContainEqual() '"abcdef"' contains '"abc"' 1`] = ` -"expect(string).not.toContain(value) +expect(string).not.toContain(value) Expected string: - \\"abcdef\\" + "abcdef" Not to contain value: - \\"abc\\" -" + "abc" + `; exports[`.toContain(), .toContainEqual() '["a", "b", "c", "d"]' contains '"a"' 1`] = ` -"expect(array).not.toContain(value) +expect(array).not.toContain(value) Expected array: - [\\"a\\", \\"b\\", \\"c\\", \\"d\\"] + ["a", "b", "c", "d"] Not to contain value: - \\"a\\" -" + "a" + `; exports[`.toContain(), .toContainEqual() '["a", "b", "c", "d"]' contains a value equal to '"a"' 1`] = ` -"expect(array).not.toContainEqual(value) +expect(array).not.toContainEqual(value) Expected array: - [\\"a\\", \\"b\\", \\"c\\", \\"d\\"] + ["a", "b", "c", "d"] Not to contain a value equal to: - \\"a\\" -" + "a" + `; exports[`.toContain(), .toContainEqual() '[{"a": "b"}, {"a": "c"}]' contains a value equal to '{"a": "b"}' 1`] = ` -"expect(array).not.toContainEqual(value) +expect(array).not.toContainEqual(value) Expected array: - [{\\"a\\": \\"b\\"}, {\\"a\\": \\"c\\"}] + [{"a": "b"}, {"a": "c"}] Not to contain a value equal to: - {\\"a\\": \\"b\\"} -" + {"a": "b"} + `; exports[`.toContain(), .toContainEqual() '[{"a": "b"}, {"a": "c"}]' does not contain a value equal to'{"a": "d"}' 1`] = ` -"expect(array).toContainEqual(value) +expect(array).toContainEqual(value) Expected array: - [{\\"a\\": \\"b\\"}, {\\"a\\": \\"c\\"}] + [{"a": "b"}, {"a": "c"}] To contain a value equal to: - {\\"a\\": \\"d\\"}" + {"a": "d"} `; exports[`.toContain(), .toContainEqual() '[{}, []]' does not contain '[]' 1`] = ` -"expect(array).toContain(value) +expect(array).toContain(value) Expected array: [{}, []] To contain value: - []" + [] `; exports[`.toContain(), .toContainEqual() '[{}, []]' does not contain '{}' 1`] = ` -"expect(array).toContain(value) +expect(array).toContain(value) Expected array: [{}, []] To contain value: - {}" + {} `; exports[`.toContain(), .toContainEqual() '[0, 1]' contains '1' 1`] = ` -"expect(object).not.toContain(value) +expect(object).not.toContain(value) Expected object: [0, 1] Not to contain value: 1 -" + `; exports[`.toContain(), .toContainEqual() '[0, 1]' contains a value equal to '1' 1`] = ` -"expect(object).not.toContainEqual(value) +expect(object).not.toContainEqual(value) Expected object: [0, 1] Not to contain a value equal to: 1 -" + `; exports[`.toContain(), .toContainEqual() '[1, 2, 3, 4]' contains '1' 1`] = ` -"expect(array).not.toContain(value) +expect(array).not.toContain(value) Expected array: [1, 2, 3, 4] Not to contain value: 1 -" + `; exports[`.toContain(), .toContainEqual() '[1, 2, 3, 4]' contains a value equal to '1' 1`] = ` -"expect(array).not.toContainEqual(value) +expect(array).not.toContainEqual(value) Expected array: [1, 2, 3, 4] Not to contain a value equal to: 1 -" + `; exports[`.toContain(), .toContainEqual() '[1, 2, 3]' does not contain '4' 1`] = ` -"expect(array).toContain(value) +expect(array).toContain(value) Expected array: [1, 2, 3] To contain value: - 4" + 4 `; exports[`.toContain(), .toContainEqual() '[Symbol(a)]' contains 'Symbol(a)' 1`] = ` -"expect(array).not.toContain(value) +expect(array).not.toContain(value) Expected array: [Symbol(a)] Not to contain value: Symbol(a) -" + `; exports[`.toContain(), .toContainEqual() '[Symbol(a)]' contains a value equal to 'Symbol(a)' 1`] = ` -"expect(array).not.toContainEqual(value) +expect(array).not.toContainEqual(value) Expected array: [Symbol(a)] Not to contain a value equal to: Symbol(a) -" + `; exports[`.toContain(), .toContainEqual() '[null, undefined]' does not contain '1' 1`] = ` -"expect(array).toContain(value) +expect(array).toContain(value) Expected array: [null, undefined] To contain value: - 1" + 1 `; exports[`.toContain(), .toContainEqual() '[undefined, null]' contains 'null' 1`] = ` -"expect(array).not.toContain(value) +expect(array).not.toContain(value) Expected array: [undefined, null] Not to contain value: null -" + `; exports[`.toContain(), .toContainEqual() '[undefined, null]' contains 'undefined' 1`] = ` -"expect(array).not.toContain(value) +expect(array).not.toContain(value) Expected array: [undefined, null] Not to contain value: undefined -" + `; exports[`.toContain(), .toContainEqual() '[undefined, null]' contains a value equal to 'null' 1`] = ` -"expect(array).not.toContainEqual(value) +expect(array).not.toContainEqual(value) Expected array: [undefined, null] Not to contain a value equal to: null -" + `; exports[`.toContain(), .toContainEqual() '[undefined, null]' contains a value equal to 'undefined' 1`] = ` -"expect(array).not.toContainEqual(value) +expect(array).not.toContainEqual(value) Expected array: [undefined, null] Not to contain a value equal to: undefined -" + `; exports[`.toContain(), .toContainEqual() 'Set {"abc", "def"}' contains '"abc"' 1`] = ` -"expect(set).not.toContain(value) +expect(set).not.toContain(value) Expected set: - Set {\\"abc\\", \\"def\\"} + Set {"abc", "def"} Not to contain value: - \\"abc\\" -" + "abc" + `; exports[`.toContain(), .toContainEqual() 'Set {1, 2, 3, 4}' contains a value equal to '1' 1`] = ` -"expect(set).not.toContainEqual(value) +expect(set).not.toContainEqual(value) Expected set: Set {1, 2, 3, 4} Not to contain a value equal to: 1 -" + `; exports[`.toContain(), .toContainEqual() error cases 1`] = ` -"expect(collection)[.not].toContainEqual(value) +expect(collection)[.not].toContainEqual(value) Expected collection to be an array-like structure. -Received: null" +Received: null `; exports[`.toContain(), .toContainEqual() error cases for toContainEqual 1`] = ` -"expect(collection)[.not].toContainEqual(value) +expect(collection)[.not].toContainEqual(value) Expected collection to be an array-like structure. -Received: null" +Received: null `; exports[`.toEqual() {pass: false} expect("Alice").not.toEqual({"asymmetricMatch": [Function asymmetricMatch]}) 1`] = ` -"expect(received).not.toEqual(expected) +expect(received).not.toEqual(expected) Expected value to not equal: - {\\"asymmetricMatch\\": [Function asymmetricMatch]} + {"asymmetricMatch": [Function asymmetricMatch]} Received: - \\"Alice\\"" + "Alice" `; exports[`.toEqual() {pass: false} expect("Eve").toEqual({"asymmetricMatch": [Function asymmetricMatch]}) 1`] = ` -"expect(received).toEqual(expected) +expect(received).toEqual(expected) Expected value to equal: - {\\"asymmetricMatch\\": [Function asymmetricMatch]} + {"asymmetricMatch": [Function asymmetricMatch]} Received: - \\"Eve\\"" + "Eve" `; exports[`.toEqual() {pass: false} expect("abc").not.toEqual("abc") 1`] = ` -"expect(received).not.toEqual(expected) +expect(received).not.toEqual(expected) Expected value to not equal: - \\"abc\\" + "abc" Received: - \\"abc\\"" + "abc" `; exports[`.toEqual() {pass: false} expect("abcd").not.toEqual(StringContaining "bc") 1`] = ` -"expect(received).not.toEqual(expected) +expect(received).not.toEqual(expected) Expected value to not equal: - StringContaining \\"bc\\" + StringContaining "bc" Received: - \\"abcd\\"" + "abcd" `; exports[`.toEqual() {pass: false} expect("abcd").not.toEqual(StringMatching /bc/) 1`] = ` -"expect(received).not.toEqual(expected) +expect(received).not.toEqual(expected) Expected value to not equal: StringMatching /bc/ Received: - \\"abcd\\"" + "abcd" `; exports[`.toEqual() {pass: false} expect("abd").toEqual(StringContaining "bc") 1`] = ` -"expect(received).toEqual(expected) +expect(received).toEqual(expected) Expected value to equal: - StringContaining \\"bc\\" + StringContaining "bc" Received: - \\"abd\\"" + "abd" `; exports[`.toEqual() {pass: false} expect("abd").toEqual(StringMatching /bc/i) 1`] = ` -"expect(received).toEqual(expected) +expect(received).toEqual(expected) Expected value to equal: StringMatching /bc/i Received: - \\"abd\\"" + "abd" `; exports[`.toEqual() {pass: false} expect("banana").toEqual("apple") 1`] = ` -"expect(received).toEqual(expected) +expect(received).toEqual(expected) Expected value to equal: - \\"apple\\" + "apple" Received: - \\"banana\\"" + "banana" `; exports[`.toEqual() {pass: false} expect([1, 2, 3]).not.toEqual(ArrayContaining [2, 3]) 1`] = ` -"expect(received).not.toEqual(expected) +expect(received).not.toEqual(expected) Expected value to not equal: ArrayContaining [2, 3] Received: - [1, 2, 3]" + [1, 2, 3] `; exports[`.toEqual() {pass: false} expect([1, 3]).toEqual(ArrayContaining [1, 2]) 1`] = ` -"expect(received).toEqual(expected) +expect(received).toEqual(expected) Expected value to equal: ArrayContaining [1, 2] @@ -1972,43 +1972,43 @@ Difference: 1, - 2, + 3, - ]" + ] `; exports[`.toEqual() {pass: false} expect([Function anonymous]).not.toEqual(Any) 1`] = ` -"expect(received).not.toEqual(expected) +expect(received).not.toEqual(expected) Expected value to not equal: Any Received: - [Function anonymous]" + [Function anonymous] `; exports[`.toEqual() {pass: false} expect({"a": 1, "b": [Function b], "c": true}).not.toEqual({"a": 1, "b": Any, "c": Anything}) 1`] = ` -"expect(received).not.toEqual(expected) +expect(received).not.toEqual(expected) Expected value to not equal: - {\\"a\\": 1, \\"b\\": Any, \\"c\\": Anything} + {"a": 1, "b": Any, "c": Anything} Received: - {\\"a\\": 1, \\"b\\": [Function b], \\"c\\": true}" + {"a": 1, "b": [Function b], "c": true} `; exports[`.toEqual() {pass: false} expect({"a": 1, "b": 2}).not.toEqual(ObjectContaining {"a": 1}) 1`] = ` -"expect(received).not.toEqual(expected) +expect(received).not.toEqual(expected) Expected value to not equal: - ObjectContaining {\\"a\\": 1} + ObjectContaining {"a": 1} Received: - {\\"a\\": 1, \\"b\\": 2}" + {"a": 1, "b": 2} `; exports[`.toEqual() {pass: false} expect({"a": 1, "b": 2}).toEqual(ObjectContaining {"a": 2}) 1`] = ` -"expect(received).toEqual(expected) +expect(received).toEqual(expected) Expected value to equal: - ObjectContaining {\\"a\\": 2} + ObjectContaining {"a": 2} Received: - {\\"a\\": 1, \\"b\\": 2} + {"a": 1, "b": 2} Difference: @@ -2016,20 +2016,20 @@ Difference: + Received -ObjectContaining { -- \\"a\\": 2, +- "a": 2, +Object { -+ \\"a\\": 1, -+ \\"b\\": 2, - }" ++ "a": 1, ++ "b": 2, + } `; exports[`.toEqual() {pass: false} expect({"a": 5}).toEqual({"b": 6}) 1`] = ` -"expect(received).toEqual(expected) +expect(received).toEqual(expected) Expected value to equal: - {\\"b\\": 6} + {"b": 6} Received: - {\\"a\\": 5} + {"a": 5} Difference: @@ -2037,22 +2037,22 @@ Difference: + Received Object { -- \\"b\\": 6, -+ \\"a\\": 5, - }" +- "b": 6, ++ "a": 5, + } `; exports[`.toEqual() {pass: false} expect({"a": 99}).not.toEqual({"a": 99}) 1`] = ` -"expect(received).not.toEqual(expected) +expect(received).not.toEqual(expected) Expected value to not equal: - {\\"a\\": 99} + {"a": 99} Received: - {\\"a\\": 99}" + {"a": 99} `; exports[`.toEqual() {pass: false} expect(0).toEqual(-0) 1`] = ` -"expect(received).toEqual(expected) +expect(received).toEqual(expected) Expected value to equal: -0 @@ -2061,29 +2061,29 @@ Received: Difference: -Compared values have no visual difference." +Compared values have no visual difference. `; exports[`.toEqual() {pass: false} expect(1).not.toEqual(1) 1`] = ` -"expect(received).not.toEqual(expected) +expect(received).not.toEqual(expected) Expected value to not equal: 1 Received: - 1" + 1 `; exports[`.toEqual() {pass: false} expect(1).toEqual(2) 1`] = ` -"expect(received).toEqual(expected) +expect(received).toEqual(expected) Expected value to equal: 2 Received: - 1" + 1 `; exports[`.toEqual() {pass: false} expect(1).toEqual(ArrayContaining [1, 2]) 1`] = ` -"expect(received).toEqual(expected) +expect(received).toEqual(expected) Expected value to equal: ArrayContaining [1, 2] @@ -2092,20 +2092,20 @@ Received: Difference: - Comparing two different types of values. Expected array but received number." + Comparing two different types of values. Expected array but received number. `; exports[`.toEqual() {pass: false} expect(Set {1, 2}).not.toEqual(Set {1, 2}) 1`] = ` -"expect(received).not.toEqual(expected) +expect(received).not.toEqual(expected) Expected value to not equal: Set {1, 2} Received: - Set {1, 2}" + Set {1, 2} `; exports[`.toEqual() {pass: false} expect(Set {1, 2}).toEqual(Set {2, 1}) 1`] = ` -"expect(received).toEqual(expected) +expect(received).toEqual(expected) Expected value to equal: Set {2, 1} @@ -2114,24 +2114,24 @@ Received: Difference: -Compared values have no visual difference." +Compared values have no visual difference. `; exports[`.toEqual() {pass: false} expect(false).toEqual(ObjectContaining {"a": 2}) 1`] = ` -"expect(received).toEqual(expected) +expect(received).toEqual(expected) Expected value to equal: - ObjectContaining {\\"a\\": 2} + ObjectContaining {"a": 2} Received: false Difference: - Comparing two different types of values. Expected object but received boolean." + Comparing two different types of values. Expected object but received boolean. `; exports[`.toEqual() {pass: false} expect(null).toEqual(undefined) 1`] = ` -"expect(received).toEqual(expected) +expect(received).toEqual(expected) Expected value to equal: undefined @@ -2140,38 +2140,38 @@ Received: Difference: - Comparing two different types of values. Expected undefined but received null." + Comparing two different types of values. Expected undefined but received null. `; exports[`.toEqual() {pass: false} expect(true).not.toEqual(Anything) 1`] = ` -"expect(received).not.toEqual(expected) +expect(received).not.toEqual(expected) Expected value to not equal: Anything Received: - true" + true `; exports[`.toEqual() {pass: false} expect(true).not.toEqual(true) 1`] = ` -"expect(received).not.toEqual(expected) +expect(received).not.toEqual(expected) Expected value to not equal: true Received: - true" + true `; exports[`.toEqual() {pass: false} expect(true).toEqual(false) 1`] = ` -"expect(received).toEqual(expected) +expect(received).toEqual(expected) Expected value to equal: false Received: - true" + true `; exports[`.toEqual() {pass: false} expect(undefined).toEqual(Any) 1`] = ` -"expect(received).toEqual(expected) +expect(received).toEqual(expected) Expected value to equal: Any @@ -2180,596 +2180,596 @@ Received: Difference: - Comparing two different types of values. Expected function but received undefined." + Comparing two different types of values. Expected function but received undefined. `; exports[`.toEqual() {pass: false} expect(undefined).toEqual(Anything) 1`] = ` -"expect(received).toEqual(expected) +expect(received).toEqual(expected) Expected value to equal: Anything Received: - undefined" + undefined `; exports[`.toHaveLength {pass: false} expect("").toHaveLength(1) 1`] = ` -"expect(received).toHaveLength(length) +expect(received).toHaveLength(length) Expected value to have length: 1 Received: - \\"\\" + "" received.length: - 0" + 0 `; exports[`.toHaveLength {pass: false} expect("abc").toHaveLength(66) 1`] = ` -"expect(received).toHaveLength(length) +expect(received).toHaveLength(length) Expected value to have length: 66 Received: - \\"abc\\" + "abc" received.length: - 3" + 3 `; exports[`.toHaveLength {pass: false} expect(["a", "b"]).toHaveLength(99) 1`] = ` -"expect(received).toHaveLength(length) +expect(received).toHaveLength(length) Expected value to have length: 99 Received: - [\\"a\\", \\"b\\"] + ["a", "b"] received.length: - 2" + 2 `; exports[`.toHaveLength {pass: false} expect([]).toHaveLength(1) 1`] = ` -"expect(received).toHaveLength(length) +expect(received).toHaveLength(length) Expected value to have length: 1 Received: [] received.length: - 0" + 0 `; exports[`.toHaveLength {pass: false} expect([1, 2]).toHaveLength(3) 1`] = ` -"expect(received).toHaveLength(length) +expect(received).toHaveLength(length) Expected value to have length: 3 Received: [1, 2] received.length: - 2" + 2 `; exports[`.toHaveLength {pass: true} expect("").toHaveLength(0) 1`] = ` -"expect(received).not.toHaveLength(length) +expect(received).not.toHaveLength(length) Expected value to not have length: 0 Received: - \\"\\" + "" received.length: - 0" + 0 `; exports[`.toHaveLength {pass: true} expect("abc").toHaveLength(3) 1`] = ` -"expect(received).not.toHaveLength(length) +expect(received).not.toHaveLength(length) Expected value to not have length: 3 Received: - \\"abc\\" + "abc" received.length: - 3" + 3 `; exports[`.toHaveLength {pass: true} expect(["a", "b"]).toHaveLength(2) 1`] = ` -"expect(received).not.toHaveLength(length) +expect(received).not.toHaveLength(length) Expected value to not have length: 2 Received: - [\\"a\\", \\"b\\"] + ["a", "b"] received.length: - 2" + 2 `; exports[`.toHaveLength {pass: true} expect([]).toHaveLength(0) 1`] = ` -"expect(received).not.toHaveLength(length) +expect(received).not.toHaveLength(length) Expected value to not have length: 0 Received: [] received.length: - 0" + 0 `; exports[`.toHaveLength {pass: true} expect([1, 2]).toHaveLength(2) 1`] = ` -"expect(received).not.toHaveLength(length) +expect(received).not.toHaveLength(length) Expected value to not have length: 2 Received: [1, 2] received.length: - 2" + 2 `; exports[`.toHaveLength error cases 1`] = ` -"expect(received)[.not].toHaveLength(length) +expect(received)[.not].toHaveLength(length) Expected value to have a 'length' property that is a number. Received: - {\\"a\\": 9} + {"a": 9} received.length: - undefined" + undefined `; exports[`.toHaveLength error cases 2`] = ` -"expect(received)[.not].toHaveLength(length) +expect(received)[.not].toHaveLength(length) Expected value to have a 'length' property that is a number. Received: 0 -" + `; exports[`.toHaveLength error cases 3`] = ` -"expect(received)[.not].toHaveLength(length) +expect(received)[.not].toHaveLength(length) Expected value to have a 'length' property that is a number. Received: undefined -" + `; exports[`.toHaveProperty() {error} expect({"a": {"b": {}}}).toHaveProperty('1') 1`] = ` -"expect(object)[.not].toHaveProperty(path) +expect(object)[.not].toHaveProperty(path) Expected path to be a string. Received: - number: 1" + number: 1 `; exports[`.toHaveProperty() {error} expect({"a": {"b": {}}}).toHaveProperty('null') 1`] = ` -"expect(object)[.not].toHaveProperty(path) +expect(object)[.not].toHaveProperty(path) Expected path to be a string. Received: - null: null" + null: null `; exports[`.toHaveProperty() {error} expect({"a": {"b": {}}}).toHaveProperty('undefined') 1`] = ` -"expect(object)[.not].toHaveProperty(path) +expect(object)[.not].toHaveProperty(path) Expected path to be a string. Received: - undefined: undefined" + undefined: undefined `; exports[`.toHaveProperty() {error} expect(null).toHaveProperty('a.b') 1`] = ` -"expect(object)[.not].toHaveProperty(path) +expect(object)[.not].toHaveProperty(path) Expected object to be an object. Received: - null: null" + null: null `; exports[`.toHaveProperty() {error} expect(undefined).toHaveProperty('a') 1`] = ` -"expect(object)[.not].toHaveProperty(path) +expect(object)[.not].toHaveProperty(path) Expected object to be an object. Received: - undefined: undefined" + undefined: undefined `; exports[`.toHaveProperty() {pass: false} expect("abc").toHaveProperty('a.b.c') 1`] = ` -"expect(object).toHaveProperty(path) +expect(object).toHaveProperty(path) Expected the object: - \\"abc\\" + "abc" To have a nested property: - \\"a.b.c\\" -" + "a.b.c" + `; exports[`.toHaveProperty() {pass: false} expect("abc").toHaveProperty('a.b.c', {"a": 5}) 1`] = ` -"expect(object).toHaveProperty(path, value) +expect(object).toHaveProperty(path, value) Expected the object: - \\"abc\\" + "abc" To have a nested property: - \\"a.b.c\\" + "a.b.c" With a value of: - {\\"a\\": 5} -" + {"a": 5} + `; exports[`.toHaveProperty() {pass: false} expect({"a": {"b": {"c": {"d": 1}}}}).toHaveProperty('a.b.c.d', 2) 1`] = ` -"expect(object).toHaveProperty(path, value) +expect(object).toHaveProperty(path, value) Expected the object: - {\\"a\\": {\\"b\\": {\\"c\\": {\\"d\\": 1}}}} + {"a": {"b": {"c": {"d": 1}}}} To have a nested property: - \\"a.b.c.d\\" + "a.b.c.d" With a value of: 2 Received: - object.a.b.c: {\\"d\\": 1}" + object.a.b.c: {"d": 1} `; exports[`.toHaveProperty() {pass: false} expect({"a": {"b": {"c": {"d": 1}}}}).toHaveProperty('a.b.ttt.d', 1) 1`] = ` -"expect(object).toHaveProperty(path, value) +expect(object).toHaveProperty(path, value) Expected the object: - {\\"a\\": {\\"b\\": {\\"c\\": {\\"d\\": 1}}}} + {"a": {"b": {"c": {"d": 1}}}} To have a nested property: - \\"a.b.ttt.d\\" + "a.b.ttt.d" With a value of: 1 Received: - object.a.b: {\\"c\\": {\\"d\\": 1}}" + object.a.b: {"c": {"d": 1}} `; exports[`.toHaveProperty() {pass: false} expect({"a": {"b": {"c": {}}}}).toHaveProperty('a.b.c.d') 1`] = ` -"expect(object).toHaveProperty(path) +expect(object).toHaveProperty(path) Expected the object: - {\\"a\\": {\\"b\\": {\\"c\\": {}}}} + {"a": {"b": {"c": {}}}} To have a nested property: - \\"a.b.c.d\\" + "a.b.c.d" Received: - object.a.b.c: {}" + object.a.b.c: {} `; exports[`.toHaveProperty() {pass: false} expect({"a": {"b": {"c": {}}}}).toHaveProperty('a.b.c.d', 1) 1`] = ` -"expect(object).toHaveProperty(path, value) +expect(object).toHaveProperty(path, value) Expected the object: - {\\"a\\": {\\"b\\": {\\"c\\": {}}}} + {"a": {"b": {"c": {}}}} To have a nested property: - \\"a.b.c.d\\" + "a.b.c.d" With a value of: 1 Received: - object.a.b.c: {}" + object.a.b.c: {} `; exports[`.toHaveProperty() {pass: false} expect({"a": {"b": {"c": 5}}}).toHaveProperty('a.b', {"c": 4}) 1`] = ` -"expect(object).toHaveProperty(path, value) +expect(object).toHaveProperty(path, value) Expected the object: - {\\"a\\": {\\"b\\": {\\"c\\": 5}}} + {"a": {"b": {"c": 5}}} To have a nested property: - \\"a.b\\" + "a.b" With a value of: - {\\"c\\": 4} + {"c": 4} Received: - object.a: {\\"b\\": {\\"c\\": 5}} + object.a: {"b": {"c": 5}} Difference: - Expected + Received Object { -- \\"c\\": 4, -+ \\"c\\": 5, - }" +- "c": 4, ++ "c": 5, + } `; exports[`.toHaveProperty() {pass: false} expect({"a": {"b": 3}}).toHaveProperty('a.b', undefined) 1`] = ` -"expect(object).toHaveProperty(path, value) +expect(object).toHaveProperty(path, value) Expected the object: - {\\"a\\": {\\"b\\": 3}} + {"a": {"b": 3}} To have a nested property: - \\"a.b\\" + "a.b" With a value of: undefined Received: - object.a: {\\"b\\": 3} + object.a: {"b": 3} Difference: - Comparing two different types of values. Expected undefined but received number." + Comparing two different types of values. Expected undefined but received number. `; exports[`.toHaveProperty() {pass: false} expect({"a": 1}).toHaveProperty('a.b.c.d') 1`] = ` -"expect(object).toHaveProperty(path) +expect(object).toHaveProperty(path) Expected the object: - {\\"a\\": 1} + {"a": 1} To have a nested property: - \\"a.b.c.d\\" + "a.b.c.d" Received: - object.a: 1" + object.a: 1 `; exports[`.toHaveProperty() {pass: false} expect({"a": 1}).toHaveProperty('a.b.c.d', 5) 1`] = ` -"expect(object).toHaveProperty(path, value) +expect(object).toHaveProperty(path, value) Expected the object: - {\\"a\\": 1} + {"a": 1} To have a nested property: - \\"a.b.c.d\\" + "a.b.c.d" With a value of: 5 Received: - object.a: 1" + object.a: 1 `; exports[`.toHaveProperty() {pass: false} expect({}).toHaveProperty('a') 1`] = ` -"expect(object).toHaveProperty(path) +expect(object).toHaveProperty(path) Expected the object: {} To have a nested property: - \\"a\\" -" + "a" + `; exports[`.toHaveProperty() {pass: false} expect({}).toHaveProperty('a', "test") 1`] = ` -"expect(object).toHaveProperty(path, value) +expect(object).toHaveProperty(path, value) Expected the object: {} To have a nested property: - \\"a\\" + "a" With a value of: - \\"test\\" -" + "test" + `; exports[`.toHaveProperty() {pass: false} expect(1).toHaveProperty('a.b.c') 1`] = ` -"expect(object).toHaveProperty(path) +expect(object).toHaveProperty(path) Expected the object: 1 To have a nested property: - \\"a.b.c\\" -" + "a.b.c" + `; exports[`.toHaveProperty() {pass: false} expect(1).toHaveProperty('a.b.c', "test") 1`] = ` -"expect(object).toHaveProperty(path, value) +expect(object).toHaveProperty(path, value) Expected the object: 1 To have a nested property: - \\"a.b.c\\" + "a.b.c" With a value of: - \\"test\\" -" + "test" + `; exports[`.toHaveProperty() {pass: true} expect({"a": {"b": {"c": {"d": 1}}}}).toHaveProperty('a.b.c.d')' 1`] = ` -"expect(object).not.toHaveProperty(path) +expect(object).not.toHaveProperty(path) Expected the object: - {\\"a\\": {\\"b\\": {\\"c\\": {\\"d\\": 1}}}} + {"a": {"b": {"c": {"d": 1}}}} Not to have a nested property: - \\"a.b.c.d\\" -" + "a.b.c.d" + `; exports[`.toHaveProperty() {pass: true} expect({"a": {"b": {"c": {"d": 1}}}}).toHaveProperty('a.b.c.d', 1) 1`] = ` -"expect(object).not.toHaveProperty(path, value) +expect(object).not.toHaveProperty(path, value) Expected the object: - {\\"a\\": {\\"b\\": {\\"c\\": {\\"d\\": 1}}}} + {"a": {"b": {"c": {"d": 1}}}} Not to have a nested property: - \\"a.b.c.d\\" + "a.b.c.d" With a value of: 1 -" + `; exports[`.toHaveProperty() {pass: true} expect({"a": {"b": {"c": 5}}}).toHaveProperty('a.b', {"c": 5}) 1`] = ` -"expect(object).not.toHaveProperty(path, value) +expect(object).not.toHaveProperty(path, value) Expected the object: - {\\"a\\": {\\"b\\": {\\"c\\": 5}}} + {"a": {"b": {"c": 5}}} Not to have a nested property: - \\"a.b\\" + "a.b" With a value of: - {\\"c\\": 5} -" + {"c": 5} + `; exports[`.toHaveProperty() {pass: true} expect({"a": {"b": undefined}}).toHaveProperty('a.b')' 1`] = ` -"expect(object).not.toHaveProperty(path) +expect(object).not.toHaveProperty(path) Expected the object: - {\\"a\\": {\\"b\\": undefined}} + {"a": {"b": undefined}} Not to have a nested property: - \\"a.b\\" -" + "a.b" + `; exports[`.toHaveProperty() {pass: true} expect({"a": {"b": undefined}}).toHaveProperty('a.b', undefined) 1`] = ` -"expect(object).not.toHaveProperty(path, value) +expect(object).not.toHaveProperty(path, value) Expected the object: - {\\"a\\": {\\"b\\": undefined}} + {"a": {"b": undefined}} Not to have a nested property: - \\"a.b\\" + "a.b" With a value of: undefined -" + `; exports[`.toHaveProperty() {pass: true} expect({"a": 0}).toHaveProperty('a')' 1`] = ` -"expect(object).not.toHaveProperty(path) +expect(object).not.toHaveProperty(path) Expected the object: - {\\"a\\": 0} + {"a": 0} Not to have a nested property: - \\"a\\" -" + "a" + `; exports[`.toHaveProperty() {pass: true} expect({"a": 0}).toHaveProperty('a', 0) 1`] = ` -"expect(object).not.toHaveProperty(path, value) +expect(object).not.toHaveProperty(path, value) Expected the object: - {\\"a\\": 0} + {"a": 0} Not to have a nested property: - \\"a\\" + "a" With a value of: 0 -" + `; exports[`.toHaveProperty() {pass: true} expect({"property": 1}).toHaveProperty('property', 1) 1`] = ` -"expect(object).not.toHaveProperty(path, value) +expect(object).not.toHaveProperty(path, value) Expected the object: - {\\"property\\": 1} + {"property": 1} Not to have a nested property: - \\"property\\" + "property" With a value of: 1 -" + `; exports[`.toMatch() {pass: true} expect(Foo bar).toMatch(/^foo/i) 1`] = ` -"expect(received).not.toMatch(expected) +expect(received).not.toMatch(expected) Expected value not to match: /^foo/i Received: - \\"Foo bar\\"" + "Foo bar" `; exports[`.toMatch() {pass: true} expect(foo).toMatch(foo) 1`] = ` -"expect(received).not.toMatch(expected) +expect(received).not.toMatch(expected) Expected value not to match: - \\"foo\\" + "foo" Received: - \\"foo\\"" + "foo" `; exports[`.toMatch() throws if non String actual value passed: [/foo/i, "foo"] 1`] = ` -"expect(string)[.not].toMatch(expected) +expect(string)[.not].toMatch(expected) string value must be a string. Received: - regexp: /foo/i" + regexp: /foo/i `; exports[`.toMatch() throws if non String actual value passed: [[], "foo"] 1`] = ` -"expect(string)[.not].toMatch(expected) +expect(string)[.not].toMatch(expected) string value must be a string. Received: - array: []" + array: [] `; exports[`.toMatch() throws if non String actual value passed: [[Function anonymous], "foo"] 1`] = ` -"expect(string)[.not].toMatch(expected) +expect(string)[.not].toMatch(expected) string value must be a string. Received: - function: [Function anonymous]" + function: [Function anonymous] `; exports[`.toMatch() throws if non String actual value passed: [{}, "foo"] 1`] = ` -"expect(string)[.not].toMatch(expected) +expect(string)[.not].toMatch(expected) string value must be a string. Received: - object: {}" + object: {} `; exports[`.toMatch() throws if non String actual value passed: [1, "foo"] 1`] = ` -"expect(string)[.not].toMatch(expected) +expect(string)[.not].toMatch(expected) string value must be a string. Received: - number: 1" + number: 1 `; exports[`.toMatch() throws if non String actual value passed: [true, "foo"] 1`] = ` -"expect(string)[.not].toMatch(expected) +expect(string)[.not].toMatch(expected) string value must be a string. Received: - boolean: true" + boolean: true `; exports[`.toMatch() throws if non String actual value passed: [undefined, "foo"] 1`] = ` -"expect(string)[.not].toMatch(expected) +expect(string)[.not].toMatch(expected) string value must be a string. -Received: undefined" +Received: undefined `; exports[`.toMatch() throws if non String/RegExp expected value passed: ["foo", []] 1`] = ` -"expect(string)[.not].toMatch(expected) +expect(string)[.not].toMatch(expected) expected value must be a string or a regular expression. Expected: - array: []" + array: [] `; exports[`.toMatch() throws if non String/RegExp expected value passed: ["foo", [Function anonymous]] 1`] = ` -"expect(string)[.not].toMatch(expected) +expect(string)[.not].toMatch(expected) expected value must be a string or a regular expression. Expected: - function: [Function anonymous]" + function: [Function anonymous] `; exports[`.toMatch() throws if non String/RegExp expected value passed: ["foo", {}] 1`] = ` -"expect(string)[.not].toMatch(expected) +expect(string)[.not].toMatch(expected) expected value must be a string or a regular expression. Expected: - object: {}" + object: {} `; exports[`.toMatch() throws if non String/RegExp expected value passed: ["foo", 1] 1`] = ` -"expect(string)[.not].toMatch(expected) +expect(string)[.not].toMatch(expected) expected value must be a string or a regular expression. Expected: - number: 1" + number: 1 `; exports[`.toMatch() throws if non String/RegExp expected value passed: ["foo", true] 1`] = ` -"expect(string)[.not].toMatch(expected) +expect(string)[.not].toMatch(expected) expected value must be a string or a regular expression. Expected: - boolean: true" + boolean: true `; exports[`.toMatch() throws if non String/RegExp expected value passed: ["foo", undefined] 1`] = ` -"expect(string)[.not].toMatch(expected) +expect(string)[.not].toMatch(expected) expected value must be a string or a regular expression. -Expected: undefined" +Expected: undefined `; exports[`.toMatch() throws: [bar, /foo/] 1`] = ` -"expect(received).toMatch(expected) +expect(received).toMatch(expected) Expected value to match: /foo/ Received: - \\"bar\\"" + "bar" `; exports[`.toMatch() throws: [bar, foo] 1`] = ` -"expect(received).toMatch(expected) +expect(received).toMatch(expected) Expected value to match: - \\"foo\\" + "foo" Received: - \\"bar\\"" + "bar" `; exports[`toMatchObject() {pass: false} expect([0]).toMatchObject([-0]) 1`] = ` -"expect(received).toMatchObject(expected) +expect(received).toMatchObject(expected) Expected value to match object: [-0] @@ -2782,11 +2782,11 @@ Difference: Array [ - -0, + 0, - ]" + ] `; exports[`toMatchObject() {pass: false} expect([1, 2, 3]).toMatchObject([1, 2, 2]) 1`] = ` -"expect(received).toMatchObject(expected) +expect(received).toMatchObject(expected) Expected value to match object: [1, 2, 2] @@ -2801,11 +2801,11 @@ Difference: 2, - 2, + 3, - ]" + ] `; exports[`toMatchObject() {pass: false} expect([1, 2, 3]).toMatchObject([2, 3, 1]) 1`] = ` -"expect(received).toMatchObject(expected) +expect(received).toMatchObject(expected) Expected value to match object: [2, 3, 1] @@ -2820,11 +2820,11 @@ Difference: 2, 3, - 1, - ]" + ] `; exports[`toMatchObject() {pass: false} expect([1, 2]).toMatchObject([1, 3]) 1`] = ` -"expect(received).toMatchObject(expected) +expect(received).toMatchObject(expected) Expected value to match object: [1, 3] @@ -2838,328 +2838,328 @@ Difference: 1, - 3, + 2, - ]" + ] `; exports[`toMatchObject() {pass: false} expect({"a": "a", "c": "d"}).toMatchObject({"a": Any}) 1`] = ` -"expect(received).toMatchObject(expected) +expect(received).toMatchObject(expected) Expected value to match object: - {\\"a\\": Any} + {"a": Any} Received: - {\\"a\\": \\"a\\", \\"c\\": \\"d\\"} + {"a": "a", "c": "d"} Difference: - Expected + Received Object { -- \\"a\\": Any, -+ \\"a\\": \\"a\\", - }" +- "a": Any, ++ "a": "a", + } `; exports[`toMatchObject() {pass: false} expect({"a": "b", "c": "d"}).toMatchObject({"a": "b!", "c": "d"}) 1`] = ` -"expect(received).toMatchObject(expected) +expect(received).toMatchObject(expected) Expected value to match object: - {\\"a\\": \\"b!\\", \\"c\\": \\"d\\"} + {"a": "b!", "c": "d"} Received: - {\\"a\\": \\"b\\", \\"c\\": \\"d\\"} + {"a": "b", "c": "d"} Difference: - Expected + Received Object { -- \\"a\\": \\"b!\\", -+ \\"a\\": \\"b\\", - \\"c\\": \\"d\\", - }" +- "a": "b!", ++ "a": "b", + "c": "d", + } `; exports[`toMatchObject() {pass: false} expect({"a": "b", "c": "d"}).toMatchObject({"e": "b"}) 1`] = ` -"expect(received).toMatchObject(expected) +expect(received).toMatchObject(expected) Expected value to match object: - {\\"e\\": \\"b\\"} + {"e": "b"} Received: - {\\"a\\": \\"b\\", \\"c\\": \\"d\\"} + {"a": "b", "c": "d"} Difference: - Expected + Received Object { -- \\"e\\": \\"b\\", -+ \\"a\\": \\"b\\", -+ \\"c\\": \\"d\\", - }" +- "e": "b", ++ "a": "b", ++ "c": "d", + } `; exports[`toMatchObject() {pass: false} expect({"a": "b", "t": {"x": {"r": "r"}, "z": "z"}}).toMatchObject({"a": "b", "t": {"z": [3]}}) 1`] = ` -"expect(received).toMatchObject(expected) +expect(received).toMatchObject(expected) Expected value to match object: - {\\"a\\": \\"b\\", \\"t\\": {\\"z\\": [3]}} + {"a": "b", "t": {"z": [3]}} Received: - {\\"a\\": \\"b\\", \\"t\\": {\\"x\\": {\\"r\\": \\"r\\"}, \\"z\\": \\"z\\"}} + {"a": "b", "t": {"x": {"r": "r"}, "z": "z"}} Difference: - Expected + Received Object { - \\"a\\": \\"b\\", - \\"t\\": Object { -- \\"z\\": Array [ + "a": "b", + "t": Object { +- "z": Array [ - 3, - ], -+ \\"z\\": \\"z\\", ++ "z": "z", }, - }" + } `; exports[`toMatchObject() {pass: false} expect({"a": "b", "t": {"x": {"r": "r"}, "z": "z"}}).toMatchObject({"t": {"l": {"r": "r"}}}) 1`] = ` -"expect(received).toMatchObject(expected) +expect(received).toMatchObject(expected) Expected value to match object: - {\\"t\\": {\\"l\\": {\\"r\\": \\"r\\"}}} + {"t": {"l": {"r": "r"}}} Received: - {\\"a\\": \\"b\\", \\"t\\": {\\"x\\": {\\"r\\": \\"r\\"}, \\"z\\": \\"z\\"}} + {"a": "b", "t": {"x": {"r": "r"}, "z": "z"}} Difference: - Expected + Received Object { - \\"t\\": Object { -- \\"l\\": Object { -+ \\"x\\": Object { - \\"r\\": \\"r\\", + "t": Object { +- "l": Object { ++ "x": Object { + "r": "r", }, -+ \\"z\\": \\"z\\", ++ "z": "z", }, - }" + } `; exports[`toMatchObject() {pass: false} expect({"a": [{"a": "a", "b": "b"}]}).toMatchObject({"a": [{"a": "c"}]}) 1`] = ` -"expect(received).toMatchObject(expected) +expect(received).toMatchObject(expected) Expected value to match object: - {\\"a\\": [{\\"a\\": \\"c\\"}]} + {"a": [{"a": "c"}]} Received: - {\\"a\\": [{\\"a\\": \\"a\\", \\"b\\": \\"b\\"}]} + {"a": [{"a": "a", "b": "b"}]} Difference: - Expected + Received Object { - \\"a\\": Array [ + "a": Array [ Object { -- \\"a\\": \\"c\\", -+ \\"a\\": \\"a\\", +- "a": "c", ++ "a": "a", }, ], - }" + } `; exports[`toMatchObject() {pass: false} expect({"a": [3, 4, "v"], "b": "b"}).toMatchObject({"a": ["v"]}) 1`] = ` -"expect(received).toMatchObject(expected) +expect(received).toMatchObject(expected) Expected value to match object: - {\\"a\\": [\\"v\\"]} + {"a": ["v"]} Received: - {\\"a\\": [3, 4, \\"v\\"], \\"b\\": \\"b\\"} + {"a": [3, 4, "v"], "b": "b"} Difference: - Expected + Received Object { - \\"a\\": Array [ + "a": Array [ + 3, + 4, - \\"v\\", + "v", ], - }" + } `; exports[`toMatchObject() {pass: false} expect({"a": [3, 4, 5], "b": "b"}).toMatchObject({"a": [3, 4, 5, 6]}) 1`] = ` -"expect(received).toMatchObject(expected) +expect(received).toMatchObject(expected) Expected value to match object: - {\\"a\\": [3, 4, 5, 6]} + {"a": [3, 4, 5, 6]} Received: - {\\"a\\": [3, 4, 5], \\"b\\": \\"b\\"} + {"a": [3, 4, 5], "b": "b"} Difference: - Expected + Received Object { - \\"a\\": Array [ + "a": Array [ 3, 4, 5, - 6, ], - }" + } `; exports[`toMatchObject() {pass: false} expect({"a": [3, 4, 5], "b": "b"}).toMatchObject({"a": [3, 4]}) 1`] = ` -"expect(received).toMatchObject(expected) +expect(received).toMatchObject(expected) Expected value to match object: - {\\"a\\": [3, 4]} + {"a": [3, 4]} Received: - {\\"a\\": [3, 4, 5], \\"b\\": \\"b\\"} + {"a": [3, 4, 5], "b": "b"} Difference: - Expected + Received Object { - \\"a\\": Array [ + "a": Array [ 3, 4, + 5, ], - }" + } `; exports[`toMatchObject() {pass: false} expect({"a": [3, 4, 5], "b": "b"}).toMatchObject({"a": {"b": 4}}) 1`] = ` -"expect(received).toMatchObject(expected) +expect(received).toMatchObject(expected) Expected value to match object: - {\\"a\\": {\\"b\\": 4}} + {"a": {"b": 4}} Received: - {\\"a\\": [3, 4, 5], \\"b\\": \\"b\\"} + {"a": [3, 4, 5], "b": "b"} Difference: - Expected + Received Object { -- \\"a\\": Object { -- \\"b\\": 4, +- "a": Object { +- "b": 4, - }, -+ \\"a\\": Array [ ++ "a": Array [ + 3, + 4, + 5, + ], - }" + } `; exports[`toMatchObject() {pass: false} expect({"a": [3, 4, 5], "b": "b"}).toMatchObject({"a": {"b": Any}}) 1`] = ` -"expect(received).toMatchObject(expected) +expect(received).toMatchObject(expected) Expected value to match object: - {\\"a\\": {\\"b\\": Any}} + {"a": {"b": Any}} Received: - {\\"a\\": [3, 4, 5], \\"b\\": \\"b\\"} + {"a": [3, 4, 5], "b": "b"} Difference: - Expected + Received Object { -- \\"a\\": Object { -- \\"b\\": Any, +- "a": Object { +- "b": Any, - }, -+ \\"a\\": Array [ ++ "a": Array [ + 3, + 4, + 5, + ], - }" + } `; exports[`toMatchObject() {pass: false} expect({"a": 1, "b": 1, "c": 1, "d": {"e": {"f": 555}}}).toMatchObject({"d": {"e": {"f": 222}}}) 1`] = ` -"expect(received).toMatchObject(expected) +expect(received).toMatchObject(expected) Expected value to match object: - {\\"d\\": {\\"e\\": {\\"f\\": 222}}} + {"d": {"e": {"f": 222}}} Received: - {\\"a\\": 1, \\"b\\": 1, \\"c\\": 1, \\"d\\": {\\"e\\": {\\"f\\": 555}}} + {"a": 1, "b": 1, "c": 1, "d": {"e": {"f": 555}}} Difference: - Expected + Received Object { - \\"d\\": Object { - \\"e\\": Object { -- \\"f\\": 222, -+ \\"f\\": 555, + "d": Object { + "e": Object { +- "f": 222, ++ "f": 555, }, }, - }" + } `; exports[`toMatchObject() {pass: false} expect({"a": 2015-11-30T00:00:00.000Z, "b": "b"}).toMatchObject({"a": 2015-10-10T00:00:00.000Z}) 1`] = ` -"expect(received).toMatchObject(expected) +expect(received).toMatchObject(expected) Expected value to match object: - {\\"a\\": 2015-10-10T00:00:00.000Z} + {"a": 2015-10-10T00:00:00.000Z} Received: - {\\"a\\": 2015-11-30T00:00:00.000Z, \\"b\\": \\"b\\"} + {"a": 2015-11-30T00:00:00.000Z, "b": "b"} Difference: - Expected + Received Object { -- \\"a\\": 2015-10-10T00:00:00.000Z, -+ \\"a\\": 2015-11-30T00:00:00.000Z, - }" +- "a": 2015-10-10T00:00:00.000Z, ++ "a": 2015-11-30T00:00:00.000Z, + } `; exports[`toMatchObject() {pass: false} expect({"a": null, "b": "b"}).toMatchObject({"a": "4"}) 1`] = ` -"expect(received).toMatchObject(expected) +expect(received).toMatchObject(expected) Expected value to match object: - {\\"a\\": \\"4\\"} + {"a": "4"} Received: - {\\"a\\": null, \\"b\\": \\"b\\"} + {"a": null, "b": "b"} Difference: - Expected + Received Object { -- \\"a\\": \\"4\\", -+ \\"a\\": null, - }" +- "a": "4", ++ "a": null, + } `; exports[`toMatchObject() {pass: false} expect({"a": null, "b": "b"}).toMatchObject({"a": undefined}) 1`] = ` -"expect(received).toMatchObject(expected) +expect(received).toMatchObject(expected) Expected value to match object: - {\\"a\\": undefined} + {"a": undefined} Received: - {\\"a\\": null, \\"b\\": \\"b\\"} + {"a": null, "b": "b"} Difference: - Expected + Received Object { -- \\"a\\": undefined, -+ \\"a\\": null, - }" +- "a": undefined, ++ "a": null, + } `; exports[`toMatchObject() {pass: false} expect({"a": undefined}).toMatchObject({"a": null}) 1`] = ` -"expect(received).toMatchObject(expected) +expect(received).toMatchObject(expected) Expected value to match object: - {\\"a\\": null} + {"a": null} Received: - {\\"a\\": undefined} + {"a": undefined} Difference: - Expected + Received Object { -- \\"a\\": null, -+ \\"a\\": undefined, - }" +- "a": null, ++ "a": undefined, + } `; exports[`toMatchObject() {pass: false} expect({}).toMatchObject({"a": undefined}) 1`] = ` -"expect(received).toMatchObject(expected) +expect(received).toMatchObject(expected) Expected value to match object: - {\\"a\\": undefined} + {"a": undefined} Received: {} Difference: @@ -3167,13 +3167,13 @@ Difference: + Received -Object { -- \\"a\\": undefined, +- "a": undefined, -} -+Object {}" ++Object {} `; exports[`toMatchObject() {pass: false} expect(2015-11-30T00:00:00.000Z).toMatchObject(2015-10-10T00:00:00.000Z) 1`] = ` -"expect(received).toMatchObject(expected) +expect(received).toMatchObject(expected) Expected value to match object: 2015-10-10T00:00:00.000Z @@ -3184,245 +3184,245 @@ Difference: + Received -2015-10-10T00:00:00.000Z -+2015-11-30T00:00:00.000Z" ++2015-11-30T00:00:00.000Z `; exports[`toMatchObject() {pass: false} expect(Set {1, 2}).toMatchObject(Set {2, 1}) 1`] = ` -"expect(received).toMatchObject(expected) +expect(received).toMatchObject(expected) Expected value to match object: Set {2, 1} Received: Set {1, 2} Difference: -Compared values have no visual difference." +Compared values have no visual difference. `; exports[`toMatchObject() {pass: true} expect([]).toMatchObject([]) 1`] = ` -"expect(received).not.toMatchObject(expected) +expect(received).not.toMatchObject(expected) Expected value not to match object: [] Received: - []" + [] `; exports[`toMatchObject() {pass: true} expect([1, 2]).toMatchObject([1, 2]) 1`] = ` -"expect(received).not.toMatchObject(expected) +expect(received).not.toMatchObject(expected) Expected value not to match object: [1, 2] Received: - [1, 2]" + [1, 2] `; exports[`toMatchObject() {pass: true} expect({"a": "b", "c": "d"}).toMatchObject({"a": "b", "c": "d"}) 1`] = ` -"expect(received).not.toMatchObject(expected) +expect(received).not.toMatchObject(expected) Expected value not to match object: - {\\"a\\": \\"b\\", \\"c\\": \\"d\\"} + {"a": "b", "c": "d"} Received: - {\\"a\\": \\"b\\", \\"c\\": \\"d\\"}" + {"a": "b", "c": "d"} `; exports[`toMatchObject() {pass: true} expect({"a": "b", "c": "d"}).toMatchObject({"a": "b"}) 1`] = ` -"expect(received).not.toMatchObject(expected) +expect(received).not.toMatchObject(expected) Expected value not to match object: - {\\"a\\": \\"b\\"} + {"a": "b"} Received: - {\\"a\\": \\"b\\", \\"c\\": \\"d\\"}" + {"a": "b", "c": "d"} `; exports[`toMatchObject() {pass: true} expect({"a": "b", "t": {"x": {"r": "r"}, "z": "z"}}).toMatchObject({"a": "b", "t": {"z": "z"}}) 1`] = ` -"expect(received).not.toMatchObject(expected) +expect(received).not.toMatchObject(expected) Expected value not to match object: - {\\"a\\": \\"b\\", \\"t\\": {\\"z\\": \\"z\\"}} + {"a": "b", "t": {"z": "z"}} Received: - {\\"a\\": \\"b\\", \\"t\\": {\\"x\\": {\\"r\\": \\"r\\"}, \\"z\\": \\"z\\"}}" + {"a": "b", "t": {"x": {"r": "r"}, "z": "z"}} `; exports[`toMatchObject() {pass: true} expect({"a": "b", "t": {"x": {"r": "r"}, "z": "z"}}).toMatchObject({"t": {"x": {"r": "r"}}}) 1`] = ` -"expect(received).not.toMatchObject(expected) +expect(received).not.toMatchObject(expected) Expected value not to match object: - {\\"t\\": {\\"x\\": {\\"r\\": \\"r\\"}}} + {"t": {"x": {"r": "r"}}} Received: - {\\"a\\": \\"b\\", \\"t\\": {\\"x\\": {\\"r\\": \\"r\\"}, \\"z\\": \\"z\\"}}" + {"a": "b", "t": {"x": {"r": "r"}, "z": "z"}} `; exports[`toMatchObject() {pass: true} expect({"a": [{"a": "a", "b": "b"}]}).toMatchObject({"a": [{"a": "a"}]}) 1`] = ` -"expect(received).not.toMatchObject(expected) +expect(received).not.toMatchObject(expected) Expected value not to match object: - {\\"a\\": [{\\"a\\": \\"a\\"}]} + {"a": [{"a": "a"}]} Received: - {\\"a\\": [{\\"a\\": \\"a\\", \\"b\\": \\"b\\"}]}" + {"a": [{"a": "a", "b": "b"}]} `; exports[`toMatchObject() {pass: true} expect({"a": [3, 4, 5, "v"], "b": "b"}).toMatchObject({"a": [3, 4, 5, "v"]}) 1`] = ` -"expect(received).not.toMatchObject(expected) +expect(received).not.toMatchObject(expected) Expected value not to match object: - {\\"a\\": [3, 4, 5, \\"v\\"]} + {"a": [3, 4, 5, "v"]} Received: - {\\"a\\": [3, 4, 5, \\"v\\"], \\"b\\": \\"b\\"}" + {"a": [3, 4, 5, "v"], "b": "b"} `; exports[`toMatchObject() {pass: true} expect({"a": [3, 4, 5], "b": "b"}).toMatchObject({"a": [3, 4, 5]}) 1`] = ` -"expect(received).not.toMatchObject(expected) +expect(received).not.toMatchObject(expected) Expected value not to match object: - {\\"a\\": [3, 4, 5]} + {"a": [3, 4, 5]} Received: - {\\"a\\": [3, 4, 5], \\"b\\": \\"b\\"}" + {"a": [3, 4, 5], "b": "b"} `; exports[`toMatchObject() {pass: true} expect({"a": {"x": "x", "y": "y"}}).toMatchObject({"a": {"x": Any}}) 1`] = ` -"expect(received).not.toMatchObject(expected) +expect(received).not.toMatchObject(expected) Expected value not to match object: - {\\"a\\": {\\"x\\": Any}} + {"a": {"x": Any}} Received: - {\\"a\\": {\\"x\\": \\"x\\", \\"y\\": \\"y\\"}}" + {"a": {"x": "x", "y": "y"}} `; exports[`toMatchObject() {pass: true} expect({"a": 1, "c": 2}).toMatchObject({"a": Any}) 1`] = ` -"expect(received).not.toMatchObject(expected) +expect(received).not.toMatchObject(expected) Expected value not to match object: - {\\"a\\": Any} + {"a": Any} Received: - {\\"a\\": 1, \\"c\\": 2}" + {"a": 1, "c": 2} `; exports[`toMatchObject() {pass: true} expect({"a": 2015-11-30T00:00:00.000Z, "b": "b"}).toMatchObject({"a": 2015-11-30T00:00:00.000Z}) 1`] = ` -"expect(received).not.toMatchObject(expected) +expect(received).not.toMatchObject(expected) Expected value not to match object: - {\\"a\\": 2015-11-30T00:00:00.000Z} + {"a": 2015-11-30T00:00:00.000Z} Received: - {\\"a\\": 2015-11-30T00:00:00.000Z, \\"b\\": \\"b\\"}" + {"a": 2015-11-30T00:00:00.000Z, "b": "b"} `; exports[`toMatchObject() {pass: true} expect({"a": null, "b": "b"}).toMatchObject({"a": null}) 1`] = ` -"expect(received).not.toMatchObject(expected) +expect(received).not.toMatchObject(expected) Expected value not to match object: - {\\"a\\": null} + {"a": null} Received: - {\\"a\\": null, \\"b\\": \\"b\\"}" + {"a": null, "b": "b"} `; exports[`toMatchObject() {pass: true} expect({"a": undefined, "b": "b"}).toMatchObject({"a": undefined}) 1`] = ` -"expect(received).not.toMatchObject(expected) +expect(received).not.toMatchObject(expected) Expected value not to match object: - {\\"a\\": undefined} + {"a": undefined} Received: - {\\"a\\": undefined, \\"b\\": \\"b\\"}" + {"a": undefined, "b": "b"} `; exports[`toMatchObject() {pass: true} expect({"a": undefined}).toMatchObject({"a": undefined}) 1`] = ` -"expect(received).not.toMatchObject(expected) +expect(received).not.toMatchObject(expected) Expected value not to match object: - {\\"a\\": undefined} + {"a": undefined} Received: - {\\"a\\": undefined}" + {"a": undefined} `; exports[`toMatchObject() {pass: true} expect(2015-11-30T00:00:00.000Z).toMatchObject(2015-11-30T00:00:00.000Z) 1`] = ` -"expect(received).not.toMatchObject(expected) +expect(received).not.toMatchObject(expected) Expected value not to match object: 2015-11-30T00:00:00.000Z Received: - 2015-11-30T00:00:00.000Z" + 2015-11-30T00:00:00.000Z `; exports[`toMatchObject() {pass: true} expect(Set {1, 2}).toMatchObject(Set {1, 2}) 1`] = ` -"expect(received).not.toMatchObject(expected) +expect(received).not.toMatchObject(expected) Expected value not to match object: Set {1, 2} Received: - Set {1, 2}" + Set {1, 2} `; exports[`toMatchObject() throws expect("44").toMatchObject({}) 1`] = ` -"expect(object)[.not].toMatchObject(expected) +expect(object)[.not].toMatchObject(expected) received value must be an object. Received: - string: \\"44\\"" + string: "44" `; exports[`toMatchObject() throws expect({}).toMatchObject("some string") 1`] = ` -"expect(object)[.not].toMatchObject(expected) +expect(object)[.not].toMatchObject(expected) expected value must be an object. Expected: - string: \\"some string\\"" + string: "some string" `; exports[`toMatchObject() throws expect({}).toMatchObject(4) 1`] = ` -"expect(object)[.not].toMatchObject(expected) +expect(object)[.not].toMatchObject(expected) expected value must be an object. Expected: - number: 4" + number: 4 `; exports[`toMatchObject() throws expect({}).toMatchObject(null) 1`] = ` -"expect(object)[.not].toMatchObject(expected) +expect(object)[.not].toMatchObject(expected) expected value must be an object. -Expected: null" +Expected: null `; exports[`toMatchObject() throws expect({}).toMatchObject(true) 1`] = ` -"expect(object)[.not].toMatchObject(expected) +expect(object)[.not].toMatchObject(expected) expected value must be an object. Expected: - boolean: true" + boolean: true `; exports[`toMatchObject() throws expect({}).toMatchObject(undefined) 1`] = ` -"expect(object)[.not].toMatchObject(expected) +expect(object)[.not].toMatchObject(expected) expected value must be an object. -Expected: undefined" +Expected: undefined `; exports[`toMatchObject() throws expect(4).toMatchObject({}) 1`] = ` -"expect(object)[.not].toMatchObject(expected) +expect(object)[.not].toMatchObject(expected) received value must be an object. Received: - number: 4" + number: 4 `; exports[`toMatchObject() throws expect(null).toMatchObject({}) 1`] = ` -"expect(object)[.not].toMatchObject(expected) +expect(object)[.not].toMatchObject(expected) received value must be an object. -Received: null" +Received: null `; exports[`toMatchObject() throws expect(true).toMatchObject({}) 1`] = ` -"expect(object)[.not].toMatchObject(expected) +expect(object)[.not].toMatchObject(expected) received value must be an object. Received: - boolean: true" + boolean: true `; exports[`toMatchObject() throws expect(undefined).toMatchObject({}) 1`] = ` -"expect(object)[.not].toMatchObject(expected) +expect(object)[.not].toMatchObject(expected) received value must be an object. -Received: undefined" +Received: undefined `; diff --git a/packages/jest-matchers/src/__tests__/__snapshots__/spy_matchers.test.js.snap b/packages/jest-matchers/src/__tests__/__snapshots__/spy_matchers.test.js.snap index 75a482ba8acf..25fae1ee6019 100644 --- a/packages/jest-matchers/src/__tests__/__snapshots__/spy_matchers.test.js.snap +++ b/packages/jest-matchers/src/__tests__/__snapshots__/spy_matchers.test.js.snap @@ -1,382 +1,382 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`lastCalledWith works only on spies or jest.fn 1`] = ` -"expect(jest.fn())[.not].lastCalledWith() +expect(jest.fn())[.not].lastCalledWith() jest.fn() value must be a mock function or spy. Received: - function: [Function fn]" + function: [Function fn] `; exports[`lastCalledWith works when not called 1`] = ` -"expect(jest.fn()).lastCalledWith(expected) +expect(jest.fn()).lastCalledWith(expected) Expected mock function to have been last called with: - [\\"foo\\", \\"bar\\"] -But it was not called." + ["foo", "bar"] +But it was not called. `; exports[`lastCalledWith works with Immutable.js objects 1`] = ` -"expect(jest.fn()).not.lastCalledWith(expected) +expect(jest.fn()).not.lastCalledWith(expected) Expected mock function to not have been last called with: - [Immutable.Map {a: {\\"b\\": \\"c\\"}}, Immutable.Map {a: {\\"b\\": \\"c\\"}}]" + [Immutable.Map {a: {"b": "c"}}, Immutable.Map {a: {"b": "c"}}] `; exports[`lastCalledWith works with Map 1`] = ` -"expect(jest.fn()).not.lastCalledWith(expected) +expect(jest.fn()).not.lastCalledWith(expected) Expected mock function to not have been last called with: - [Map {1 => 2, 2 => 1}]" + [Map {1 => 2, 2 => 1}] `; exports[`lastCalledWith works with Map 2`] = ` -"expect(jest.fn()).lastCalledWith(expected) +expect(jest.fn()).lastCalledWith(expected) Expected mock function to have been last called with: - Map {\\"a\\" => \\"b\\", \\"b\\" => \\"a\\"} as argument 1, but it was called with Map {1 => 2, 2 => 1}." + Map {"a" => "b", "b" => "a"} as argument 1, but it was called with Map {1 => 2, 2 => 1}. `; exports[`lastCalledWith works with Set 1`] = ` -"expect(jest.fn()).not.lastCalledWith(expected) +expect(jest.fn()).not.lastCalledWith(expected) Expected mock function to not have been last called with: - [Set {1, 2}]" + [Set {1, 2}] `; exports[`lastCalledWith works with Set 2`] = ` -"expect(jest.fn()).lastCalledWith(expected) +expect(jest.fn()).lastCalledWith(expected) Expected mock function to have been last called with: - Set {3, 4} as argument 1, but it was called with Set {1, 2}." + Set {3, 4} as argument 1, but it was called with Set {1, 2}. `; exports[`lastCalledWith works with arguments that don't match 1`] = ` -"expect(jest.fn()).lastCalledWith(expected) +expect(jest.fn()).lastCalledWith(expected) Expected mock function to have been last called with: - \\"bar\\" as argument 2, but it was called with \\"bar1\\"." + "bar" as argument 2, but it was called with "bar1". `; exports[`lastCalledWith works with arguments that match 1`] = ` -"expect(jest.fn()).not.lastCalledWith(expected) +expect(jest.fn()).not.lastCalledWith(expected) Expected mock function to not have been last called with: - [\\"foo\\", \\"bar\\"]" + ["foo", "bar"] `; exports[`lastCalledWith works with many arguments 1`] = ` -"expect(jest.fn()).not.lastCalledWith(expected) +expect(jest.fn()).not.lastCalledWith(expected) Expected mock function to not have been last called with: - [\\"foo\\", \\"bar\\"]" + ["foo", "bar"] `; exports[`lastCalledWith works with many arguments that don't match 1`] = ` -"expect(jest.fn()).lastCalledWith(expected) +expect(jest.fn()).lastCalledWith(expected) Expected mock function to have been last called with: - \\"bar\\" as argument 2, but it was called with \\"bar3\\"." + "bar" as argument 2, but it was called with "bar3". `; exports[`toBeCalled works only on spies or jest.fn 1`] = ` -"expect(jest.fn())[.not].toBeCalled() +expect(jest.fn())[.not].toBeCalled() jest.fn() value must be a mock function or spy. Received: - function: [Function fn]" + function: [Function fn] `; exports[`toBeCalled works with jest.fn 1`] = ` -"expect(jest.fn()).toBeCalled() +expect(jest.fn()).toBeCalled() -Expected mock function to have been called." +Expected mock function to have been called. `; exports[`toBeCalled works with jest.fn 2`] = ` -"expect(jest.fn()).not.toBeCalled() +expect(jest.fn()).not.toBeCalled() Expected mock function not to be called but it was called with: - []" + [] `; exports[`toBeCalled works with jest.fn 3`] = ` -"expect(received)[.not].toBeCalled() +expect(received)[.not].toBeCalled() Matcher does not accept any arguments. Got: - number: 555" + number: 555 `; exports[`toBeCalledWith works only on spies or jest.fn 1`] = ` -"expect(jest.fn())[.not].toBeCalledWith() +expect(jest.fn())[.not].toBeCalledWith() jest.fn() value must be a mock function or spy. Received: - function: [Function fn]" + function: [Function fn] `; exports[`toHaveBeenCalled works only on spies or jest.fn 1`] = ` -"expect(jest.fn())[.not].toHaveBeenCalled() +expect(jest.fn())[.not].toHaveBeenCalled() jest.fn() value must be a mock function or spy. Received: - function: [Function fn]" + function: [Function fn] `; exports[`toHaveBeenCalled works with jest.fn 1`] = ` -"expect(jest.fn()).toHaveBeenCalled() +expect(jest.fn()).toHaveBeenCalled() -Expected mock function to have been called." +Expected mock function to have been called. `; exports[`toHaveBeenCalled works with jest.fn 2`] = ` -"expect(jest.fn()).not.toHaveBeenCalled() +expect(jest.fn()).not.toHaveBeenCalled() Expected mock function not to be called but it was called with: - []" + [] `; exports[`toHaveBeenCalled works with jest.fn 3`] = ` -"expect(received)[.not].toHaveBeenCalled() +expect(received)[.not].toHaveBeenCalled() Matcher does not accept any arguments. Got: - number: 555" + number: 555 `; exports[`toHaveBeenCalledTimes accepts only numbers 1`] = ` -"expect(received)[.not].toHaveBeenCalledTimes(expected) +expect(received)[.not].toHaveBeenCalledTimes(expected) Expected value must be a number. Got: - object: {}" + object: {} `; exports[`toHaveBeenCalledTimes accepts only numbers 2`] = ` -"expect(received)[.not].toHaveBeenCalledTimes(expected) +expect(received)[.not].toHaveBeenCalledTimes(expected) Expected value must be a number. Got: - array: []" + array: [] `; exports[`toHaveBeenCalledTimes accepts only numbers 3`] = ` -"expect(received)[.not].toHaveBeenCalledTimes(expected) +expect(received)[.not].toHaveBeenCalledTimes(expected) Expected value must be a number. Got: - boolean: true" + boolean: true `; exports[`toHaveBeenCalledTimes accepts only numbers 4`] = ` -"expect(received)[.not].toHaveBeenCalledTimes(expected) +expect(received)[.not].toHaveBeenCalledTimes(expected) Expected value must be a number. Got: - string: \\"a\\"" + string: "a" `; exports[`toHaveBeenCalledTimes accepts only numbers 5`] = ` -"expect(received)[.not].toHaveBeenCalledTimes(expected) +expect(received)[.not].toHaveBeenCalledTimes(expected) Expected value must be a number. Got: - map: Map {}" + map: Map {} `; exports[`toHaveBeenCalledTimes accepts only numbers 6`] = ` -"expect(received)[.not].toHaveBeenCalledTimes(expected) +expect(received)[.not].toHaveBeenCalledTimes(expected) Expected value must be a number. Got: - function: [Function anonymous]" + function: [Function anonymous] `; exports[`toHaveBeenCalledTimes fails if function called less than expected times 1`] = ` -"expect(jest.fn()).toHaveBeenCalledTimes(2) +expect(jest.fn()).toHaveBeenCalledTimes(2) -Expected mock function to have been called two times, but it was called one time." +Expected mock function to have been called two times, but it was called one time. `; exports[`toHaveBeenCalledTimes fails if function called more than expected times 1`] = ` -"expect(jest.fn()).toHaveBeenCalledTimes(2) +expect(jest.fn()).toHaveBeenCalledTimes(2) -Expected mock function to have been called two times, but it was called three times." +Expected mock function to have been called two times, but it was called three times. `; exports[`toHaveBeenCalledTimes passes if function called equal to expected times 1`] = ` -"expect(jest.fn()).not.toHaveBeenCalledTimes(2) +expect(jest.fn()).not.toHaveBeenCalledTimes(2) -Expected mock function not to be called two times, but it was called exactly two times." +Expected mock function not to be called two times, but it was called exactly two times. `; exports[`toHaveBeenCalledTimes verifies that actual is a Spy 1`] = ` -"expect(jest.fn())[.not].toHaveBeenCalledTimes() +expect(jest.fn())[.not].toHaveBeenCalledTimes() jest.fn() value must be a mock function or spy. Received: - function: [Function fn]" + function: [Function fn] `; exports[`toHaveBeenCalledWith works only on spies or jest.fn 1`] = ` -"expect(jest.fn())[.not].toHaveBeenCalledWith() +expect(jest.fn())[.not].toHaveBeenCalledWith() jest.fn() value must be a mock function or spy. Received: - function: [Function fn]" + function: [Function fn] `; exports[`toHaveBeenCalledWith works when not called 1`] = ` -"expect(jest.fn()).toHaveBeenCalledWith(expected) +expect(jest.fn()).toHaveBeenCalledWith(expected) Expected mock function to have been called with: - [\\"foo\\", \\"bar\\"] -But it was not called." + ["foo", "bar"] +But it was not called. `; exports[`toHaveBeenCalledWith works with Immutable.js objects 1`] = ` -"expect(jest.fn()).not.toHaveBeenCalledWith(expected) +expect(jest.fn()).not.toHaveBeenCalledWith(expected) Expected mock function not to have been called with: - [Immutable.Map {a: {\\"b\\": \\"c\\"}}, Immutable.Map {a: {\\"b\\": \\"c\\"}}]" + [Immutable.Map {a: {"b": "c"}}, Immutable.Map {a: {"b": "c"}}] `; exports[`toHaveBeenCalledWith works with Map 1`] = ` -"expect(jest.fn()).not.toHaveBeenCalledWith(expected) +expect(jest.fn()).not.toHaveBeenCalledWith(expected) Expected mock function not to have been called with: - [Map {1 => 2, 2 => 1}]" + [Map {1 => 2, 2 => 1}] `; exports[`toHaveBeenCalledWith works with Map 2`] = ` -"expect(jest.fn()).toHaveBeenCalledWith(expected) +expect(jest.fn()).toHaveBeenCalledWith(expected) Expected mock function to have been called with: - Map {\\"a\\" => \\"b\\", \\"b\\" => \\"a\\"} as argument 1, but it was called with Map {1 => 2, 2 => 1}." + Map {"a" => "b", "b" => "a"} as argument 1, but it was called with Map {1 => 2, 2 => 1}. `; exports[`toHaveBeenCalledWith works with Set 1`] = ` -"expect(jest.fn()).not.toHaveBeenCalledWith(expected) +expect(jest.fn()).not.toHaveBeenCalledWith(expected) Expected mock function not to have been called with: - [Set {1, 2}]" + [Set {1, 2}] `; exports[`toHaveBeenCalledWith works with Set 2`] = ` -"expect(jest.fn()).toHaveBeenCalledWith(expected) +expect(jest.fn()).toHaveBeenCalledWith(expected) Expected mock function to have been called with: - Set {3, 4} as argument 1, but it was called with Set {1, 2}." + Set {3, 4} as argument 1, but it was called with Set {1, 2}. `; exports[`toHaveBeenCalledWith works with arguments that don't match 1`] = ` -"expect(jest.fn()).toHaveBeenCalledWith(expected) +expect(jest.fn()).toHaveBeenCalledWith(expected) Expected mock function to have been called with: - \\"bar\\" as argument 2, but it was called with \\"bar1\\"." + "bar" as argument 2, but it was called with "bar1". `; exports[`toHaveBeenCalledWith works with arguments that match 1`] = ` -"expect(jest.fn()).not.toHaveBeenCalledWith(expected) +expect(jest.fn()).not.toHaveBeenCalledWith(expected) Expected mock function not to have been called with: - [\\"foo\\", \\"bar\\"]" + ["foo", "bar"] `; exports[`toHaveBeenCalledWith works with many arguments 1`] = ` -"expect(jest.fn()).not.toHaveBeenCalledWith(expected) +expect(jest.fn()).not.toHaveBeenCalledWith(expected) Expected mock function not to have been called with: - [\\"foo\\", \\"bar\\"]" + ["foo", "bar"] `; exports[`toHaveBeenCalledWith works with many arguments that don't match 1`] = ` -"expect(jest.fn()).toHaveBeenCalledWith(expected) +expect(jest.fn()).toHaveBeenCalledWith(expected) Expected mock function to have been called with: - \\"bar\\" as argument 2, but it was called with \\"bar3\\". + "bar" as argument 2, but it was called with "bar3". - \\"bar\\" as argument 2, but it was called with \\"bar2\\". + "bar" as argument 2, but it was called with "bar2". - \\"bar\\" as argument 2, but it was called with \\"bar1\\"." + "bar" as argument 2, but it was called with "bar1". `; exports[`toHaveBeenLastCalledWith works only on spies or jest.fn 1`] = ` -"expect(jest.fn())[.not].toHaveBeenLastCalledWith() +expect(jest.fn())[.not].toHaveBeenLastCalledWith() jest.fn() value must be a mock function or spy. Received: - function: [Function fn]" + function: [Function fn] `; exports[`toHaveBeenLastCalledWith works when not called 1`] = ` -"expect(jest.fn()).toHaveBeenLastCalledWith(expected) +expect(jest.fn()).toHaveBeenLastCalledWith(expected) Expected mock function to have been last called with: - [\\"foo\\", \\"bar\\"] -But it was not called." + ["foo", "bar"] +But it was not called. `; exports[`toHaveBeenLastCalledWith works with Immutable.js objects 1`] = ` -"expect(jest.fn()).not.toHaveBeenLastCalledWith(expected) +expect(jest.fn()).not.toHaveBeenLastCalledWith(expected) Expected mock function to not have been last called with: - [Immutable.Map {a: {\\"b\\": \\"c\\"}}, Immutable.Map {a: {\\"b\\": \\"c\\"}}]" + [Immutable.Map {a: {"b": "c"}}, Immutable.Map {a: {"b": "c"}}] `; exports[`toHaveBeenLastCalledWith works with Map 1`] = ` -"expect(jest.fn()).not.toHaveBeenLastCalledWith(expected) +expect(jest.fn()).not.toHaveBeenLastCalledWith(expected) Expected mock function to not have been last called with: - [Map {1 => 2, 2 => 1}]" + [Map {1 => 2, 2 => 1}] `; exports[`toHaveBeenLastCalledWith works with Map 2`] = ` -"expect(jest.fn()).toHaveBeenLastCalledWith(expected) +expect(jest.fn()).toHaveBeenLastCalledWith(expected) Expected mock function to have been last called with: - Map {\\"a\\" => \\"b\\", \\"b\\" => \\"a\\"} as argument 1, but it was called with Map {1 => 2, 2 => 1}." + Map {"a" => "b", "b" => "a"} as argument 1, but it was called with Map {1 => 2, 2 => 1}. `; exports[`toHaveBeenLastCalledWith works with Set 1`] = ` -"expect(jest.fn()).not.toHaveBeenLastCalledWith(expected) +expect(jest.fn()).not.toHaveBeenLastCalledWith(expected) Expected mock function to not have been last called with: - [Set {1, 2}]" + [Set {1, 2}] `; exports[`toHaveBeenLastCalledWith works with Set 2`] = ` -"expect(jest.fn()).toHaveBeenLastCalledWith(expected) +expect(jest.fn()).toHaveBeenLastCalledWith(expected) Expected mock function to have been last called with: - Set {3, 4} as argument 1, but it was called with Set {1, 2}." + Set {3, 4} as argument 1, but it was called with Set {1, 2}. `; exports[`toHaveBeenLastCalledWith works with arguments that don't match 1`] = ` -"expect(jest.fn()).toHaveBeenLastCalledWith(expected) +expect(jest.fn()).toHaveBeenLastCalledWith(expected) Expected mock function to have been last called with: - \\"bar\\" as argument 2, but it was called with \\"bar1\\"." + "bar" as argument 2, but it was called with "bar1". `; exports[`toHaveBeenLastCalledWith works with arguments that match 1`] = ` -"expect(jest.fn()).not.toHaveBeenLastCalledWith(expected) +expect(jest.fn()).not.toHaveBeenLastCalledWith(expected) Expected mock function to not have been last called with: - [\\"foo\\", \\"bar\\"]" + ["foo", "bar"] `; exports[`toHaveBeenLastCalledWith works with many arguments 1`] = ` -"expect(jest.fn()).not.toHaveBeenLastCalledWith(expected) +expect(jest.fn()).not.toHaveBeenLastCalledWith(expected) Expected mock function to not have been last called with: - [\\"foo\\", \\"bar\\"]" + ["foo", "bar"] `; exports[`toHaveBeenLastCalledWith works with many arguments that don't match 1`] = ` -"expect(jest.fn()).toHaveBeenLastCalledWith(expected) +expect(jest.fn()).toHaveBeenLastCalledWith(expected) Expected mock function to have been last called with: - \\"bar\\" as argument 2, but it was called with \\"bar3\\"." + "bar" as argument 2, but it was called with "bar3". `; diff --git a/packages/jest-matchers/src/__tests__/__snapshots__/to_throw_matchers.test.js.snap b/packages/jest-matchers/src/__tests__/__snapshots__/to_throw_matchers.test.js.snap index 0b6874d85fff..8736ef46698b 100644 --- a/packages/jest-matchers/src/__tests__/__snapshots__/to_throw_matchers.test.js.snap +++ b/packages/jest-matchers/src/__tests__/__snapshots__/to_throw_matchers.test.js.snap @@ -1,199 +1,199 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`.toThrow() error class did not throw at all 1`] = ` -"expect(function).toThrow(type) +expect(function).toThrow(type) Expected the function to throw an error of type: - \\"Err\\" -But it didn't throw anything." + "Err" +But it didn't throw anything. `; exports[`.toThrow() error class threw, but class did not match 1`] = ` -"expect(function).toThrow(type) +expect(function).toThrow(type) Expected the function to throw an error of type: - \\"Err2\\" + "Err2" Instead, it threw: - Error - at jestExpect (packages/jest-matchers/src/__tests__/toThrowMatchers-test.js:24:74)" + Error + at jestExpect (packages/jest-matchers/src/__tests__/toThrowMatchers-test.js:24:74) `; exports[`.toThrow() error class threw, but should not have 1`] = ` -"expect(function).not.toThrow(type) +expect(function).not.toThrow(type) Expected the function not to throw an error of type: - \\"Err\\" + "Err" Instead, it threw: - Error - at jestExpect (packages/jest-matchers/src/__tests__/toThrowMatchers-test.js:24:74)" + Error + at jestExpect (packages/jest-matchers/src/__tests__/toThrowMatchers-test.js:24:74) `; exports[`.toThrow() invalid actual 1`] = ` -"expect(function).toThrow(undefined) +expect(function).toThrow(undefined) -Received value must be a function, but instead \\"string\\" was found" +Received value must be a function, but instead "string" was found `; exports[`.toThrow() invalid arguments 1`] = ` -"expect(function).not.toThrow(number) +expect(function).not.toThrow(number) Unexpected argument passed. -Expected: \\"string\\", \\"Error (type)\\" or \\"regexp\\". +Expected: "string", "Error (type)" or "regexp". Got: - string: \\"111\\"" + string: "111" `; exports[`.toThrow() regexp did not throw at all 1`] = ` -"expect(function).toThrow(regexp) +expect(function).toThrow(regexp) Expected the function to throw an error matching: /apple/ -But it didn't throw anything." +But it didn't throw anything. `; exports[`.toThrow() regexp threw, but message did not match 1`] = ` -"expect(function).toThrow(regexp) +expect(function).toThrow(regexp) Expected the function to throw an error matching: /banana/ Instead, it threw: - Error - at jestExpect (packages/jest-matchers/src/__tests__/toThrowMatchers-test.js:24:74)" + Error + at jestExpect (packages/jest-matchers/src/__tests__/toThrowMatchers-test.js:24:74) `; exports[`.toThrow() regexp threw, but should not have 1`] = ` -"expect(function).not.toThrow(regexp) +expect(function).not.toThrow(regexp) Expected the function not to throw an error matching: /apple/ Instead, it threw: - Error - at jestExpect (packages/jest-matchers/src/__tests__/toThrowMatchers-test.js:24:74)" + Error + at jestExpect (packages/jest-matchers/src/__tests__/toThrowMatchers-test.js:24:74) `; exports[`.toThrow() strings did not throw at all 1`] = ` -"expect(function).toThrow(string) +expect(function).toThrow(string) Expected the function to throw an error matching: - \\"apple\\" -But it didn't throw anything." + "apple" +But it didn't throw anything. `; exports[`.toThrow() strings threw, but message did not match 1`] = ` -"expect(function).toThrow(string) +expect(function).toThrow(string) Expected the function to throw an error matching: - \\"banana\\" + "banana" Instead, it threw: - Error - at jestExpect (packages/jest-matchers/src/__tests__/toThrowMatchers-test.js:24:74)" + Error + at jestExpect (packages/jest-matchers/src/__tests__/toThrowMatchers-test.js:24:74) `; exports[`.toThrow() strings threw, but should not have 1`] = ` -"expect(function).not.toThrow(string) +expect(function).not.toThrow(string) Expected the function not to throw an error matching: - \\"apple\\" + "apple" Instead, it threw: - Error - at jestExpect (packages/jest-matchers/src/__tests__/toThrowMatchers-test.js:24:74)" + Error + at jestExpect (packages/jest-matchers/src/__tests__/toThrowMatchers-test.js:24:74) `; exports[`.toThrowError() error class did not throw at all 1`] = ` -"expect(function).toThrowError(type) +expect(function).toThrowError(type) Expected the function to throw an error of type: - \\"Err\\" -But it didn't throw anything." + "Err" +But it didn't throw anything. `; exports[`.toThrowError() error class threw, but class did not match 1`] = ` -"expect(function).toThrowError(type) +expect(function).toThrowError(type) Expected the function to throw an error of type: - \\"Err2\\" + "Err2" Instead, it threw: - Error - at jestExpect (packages/jest-matchers/src/__tests__/toThrowMatchers-test.js:24:74)" + Error + at jestExpect (packages/jest-matchers/src/__tests__/toThrowMatchers-test.js:24:74) `; exports[`.toThrowError() error class threw, but should not have 1`] = ` -"expect(function).not.toThrowError(type) +expect(function).not.toThrowError(type) Expected the function not to throw an error of type: - \\"Err\\" + "Err" Instead, it threw: - Error - at jestExpect (packages/jest-matchers/src/__tests__/toThrowMatchers-test.js:24:74)" + Error + at jestExpect (packages/jest-matchers/src/__tests__/toThrowMatchers-test.js:24:74) `; exports[`.toThrowError() invalid actual 1`] = ` -"expect(function).toThrowError(undefined) +expect(function).toThrowError(undefined) -Received value must be a function, but instead \\"string\\" was found" +Received value must be a function, but instead "string" was found `; exports[`.toThrowError() invalid arguments 1`] = ` -"expect(function).not.toThrowError(number) +expect(function).not.toThrowError(number) Unexpected argument passed. -Expected: \\"string\\", \\"Error (type)\\" or \\"regexp\\". +Expected: "string", "Error (type)" or "regexp". Got: - string: \\"111\\"" + string: "111" `; exports[`.toThrowError() regexp did not throw at all 1`] = ` -"expect(function).toThrowError(regexp) +expect(function).toThrowError(regexp) Expected the function to throw an error matching: /apple/ -But it didn't throw anything." +But it didn't throw anything. `; exports[`.toThrowError() regexp threw, but message did not match 1`] = ` -"expect(function).toThrowError(regexp) +expect(function).toThrowError(regexp) Expected the function to throw an error matching: /banana/ Instead, it threw: - Error - at jestExpect (packages/jest-matchers/src/__tests__/toThrowMatchers-test.js:24:74)" + Error + at jestExpect (packages/jest-matchers/src/__tests__/toThrowMatchers-test.js:24:74) `; exports[`.toThrowError() regexp threw, but should not have 1`] = ` -"expect(function).not.toThrowError(regexp) +expect(function).not.toThrowError(regexp) Expected the function not to throw an error matching: /apple/ Instead, it threw: - Error - at jestExpect (packages/jest-matchers/src/__tests__/toThrowMatchers-test.js:24:74)" + Error + at jestExpect (packages/jest-matchers/src/__tests__/toThrowMatchers-test.js:24:74) `; exports[`.toThrowError() strings did not throw at all 1`] = ` -"expect(function).toThrowError(string) +expect(function).toThrowError(string) Expected the function to throw an error matching: - \\"apple\\" -But it didn't throw anything." + "apple" +But it didn't throw anything. `; exports[`.toThrowError() strings threw, but message did not match 1`] = ` -"expect(function).toThrowError(string) +expect(function).toThrowError(string) Expected the function to throw an error matching: - \\"banana\\" + "banana" Instead, it threw: - Error - at jestExpect (packages/jest-matchers/src/__tests__/toThrowMatchers-test.js:24:74)" + Error + at jestExpect (packages/jest-matchers/src/__tests__/toThrowMatchers-test.js:24:74) `; exports[`.toThrowError() strings threw, but should not have 1`] = ` -"expect(function).not.toThrowError(string) +expect(function).not.toThrowError(string) Expected the function not to throw an error matching: - \\"apple\\" + "apple" Instead, it threw: - Error - at jestExpect (packages/jest-matchers/src/__tests__/toThrowMatchers-test.js:24:74)" + Error + at jestExpect (packages/jest-matchers/src/__tests__/toThrowMatchers-test.js:24:74) `; diff --git a/packages/jest-message-util/src/__tests__/__snapshots__/messages.test.js.snap b/packages/jest-message-util/src/__tests__/__snapshots__/messages.test.js.snap index ad5059bf544e..6f2caf6967df 100644 --- a/packages/jest-message-util/src/__tests__/__snapshots__/messages.test.js.snap +++ b/packages/jest-message-util/src/__tests__/__snapshots__/messages.test.js.snap @@ -1,18 +1,18 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`.formatExecError() 1`] = ` -" ● Test suite failed to run + ● Test suite failed to run Whoops! -" + `; exports[`should exclude jasmine from stack trace for Unix paths. 1`] = ` -" Unix test + Unix test at stack (../jest-jasmine2/build/jasmine-2.4.1.js:1580:17) - at Object.addResult (../jest-jasmine2/build/jasmine-2.4.1.js:1550:14) - at Object.it (build/__tests__/messages-test.js:45:41) -" + at Object.addResult (../jest-jasmine2/build/jasmine-2.4.1.js:1550:14) + at Object.it (build/__tests__/messages-test.js:45:41) + `; diff --git a/packages/jest-runtime/src/__tests__/__snapshots__/script_transformer.test.js.snap b/packages/jest-runtime/src/__tests__/__snapshots__/script_transformer.test.js.snap index d2deb8aab43b..ef6d0d0af1e1 100644 --- a/packages/jest-runtime/src/__tests__/__snapshots__/script_transformer.test.js.snap +++ b/packages/jest-runtime/src/__tests__/__snapshots__/script_transformer.test.js.snap @@ -1,53 +1,53 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`ScriptTransformer transforms a file properly 1`] = ` -"({\\"Object.\\":function(module,exports,require,__dirname,__filename,global,jest){/* istanbul ignore next */var cov_25u22311x4 = function () {var path = \\"/fruits/banana.js\\",hash = \\"04636d4ae73b4b3e24bf6fba39e08c946fd0afb5\\",global = new Function('return this')(),gcv = \\"__coverage__\\",coverageData = { path: \\"/fruits/banana.js\\", statementMap: { \\"0\\": { start: { line: 1, column: 0 }, end: { line: 1, column: 26 } } }, fnMap: {}, branchMap: {}, s: { \\"0\\": 0 }, f: {}, b: {}, _coverageSchema: \\"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c\\" },coverage = global[gcv] || (global[gcv] = {});if (coverage[path] && coverage[path].hash === hash) {return coverage[path];}coverageData.hash = hash;return coverage[path] = coverageData;}();++cov_25u22311x4.s[0];module.exports = \\"banana\\"; -}});" +({"Object.":function(module,exports,require,__dirname,__filename,global,jest){/* istanbul ignore next */var cov_25u22311x4 = function () {var path = "/fruits/banana.js",hash = "04636d4ae73b4b3e24bf6fba39e08c946fd0afb5",global = new Function('return this')(),gcv = "__coverage__",coverageData = { path: "/fruits/banana.js", statementMap: { "0": { start: { line: 1, column: 0 }, end: { line: 1, column: 26 } } }, fnMap: {}, branchMap: {}, s: { "0": 0 }, f: {}, b: {}, _coverageSchema: "332fd63041d2c1bcb487cc26dd0d5f7d97098a6c" },coverage = global[gcv] || (global[gcv] = {});if (coverage[path] && coverage[path].hash === hash) {return coverage[path];}coverageData.hash = hash;return coverage[path] = coverageData;}();++cov_25u22311x4.s[0];module.exports = "banana"; +}}); `; exports[`ScriptTransformer transforms a file properly 2`] = ` -"({\\"Object.\\":function(module,exports,require,__dirname,__filename,global,jest){/* istanbul ignore next */var cov_23yvu8etmu = function () {var path = \\"/fruits/kiwi.js\\",hash = \\"58d742d8c615e16eb5dffec9322e6ed1babde8f3\\",global = new Function('return this')(),gcv = \\"__coverage__\\",coverageData = { path: \\"/fruits/kiwi.js\\", statementMap: { \\"0\\": { start: { line: 1, column: 0 }, end: { line: 1, column: 30 } }, \\"1\\": { start: { line: 1, column: 23 }, end: { line: 1, column: 29 } } }, fnMap: { \\"0\\": { name: \\"(anonymous_0)\\", decl: { start: { line: 1, column: 17 }, end: { line: 1, column: 18 } }, loc: { start: { line: 1, column: 23 }, end: { line: 1, column: 29 } }, line: 1 } }, branchMap: {}, s: { \\"0\\": 0, \\"1\\": 0 }, f: { \\"0\\": 0 }, b: {}, _coverageSchema: \\"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c\\" },coverage = global[gcv] || (global[gcv] = {});if (coverage[path] && coverage[path].hash === hash) {return coverage[path];}coverageData.hash = hash;return coverage[path] = coverageData;}();++cov_23yvu8etmu.s[0];module.exports = () => {/* istanbul ignore next */++cov_23yvu8etmu.f[0];++cov_23yvu8etmu.s[1];return \\"kiwi\\";}; -}});" +({"Object.":function(module,exports,require,__dirname,__filename,global,jest){/* istanbul ignore next */var cov_23yvu8etmu = function () {var path = "/fruits/kiwi.js",hash = "58d742d8c615e16eb5dffec9322e6ed1babde8f3",global = new Function('return this')(),gcv = "__coverage__",coverageData = { path: "/fruits/kiwi.js", statementMap: { "0": { start: { line: 1, column: 0 }, end: { line: 1, column: 30 } }, "1": { start: { line: 1, column: 23 }, end: { line: 1, column: 29 } } }, fnMap: { "0": { name: "(anonymous_0)", decl: { start: { line: 1, column: 17 }, end: { line: 1, column: 18 } }, loc: { start: { line: 1, column: 23 }, end: { line: 1, column: 29 } }, line: 1 } }, branchMap: {}, s: { "0": 0, "1": 0 }, f: { "0": 0 }, b: {}, _coverageSchema: "332fd63041d2c1bcb487cc26dd0d5f7d97098a6c" },coverage = global[gcv] || (global[gcv] = {});if (coverage[path] && coverage[path].hash === hash) {return coverage[path];}coverageData.hash = hash;return coverage[path] = coverageData;}();++cov_23yvu8etmu.s[0];module.exports = () => {/* istanbul ignore next */++cov_23yvu8etmu.f[0];++cov_23yvu8etmu.s[1];return "kiwi";}; +}}); `; exports[`ScriptTransformer uses multiple preprocessors 1`] = ` -"({\\"Object.\\":function(module,exports,require,__dirname,__filename,global,jest){ +({"Object.":function(module,exports,require,__dirname,__filename,global,jest){ const TRANSFORMED = { filename: '/fruits/banana.js', - script: 'module.exports = \\"banana\\";', - config: '{\\"cache\\":true,\\"cacheDirectory\\":\\"/cache/\\",\\"name\\":\\"test\\",\\"rootDir\\":\\"/\\",\\"transformIgnorePatterns\\":[\\"/node_modules/\\"],\\"transform\\":[[\\"^.+\\\\\\\\.js$\\",\\"test_preprocessor\\"],[\\"^.+\\\\\\\\.css$\\",\\"css-preprocessor\\"]]}', + script: 'module.exports = "banana";', + config: '{"cache":true,"cacheDirectory":"/cache/","name":"test","rootDir":"/","transformIgnorePatterns":["/node_modules/"],"transform":[["^.+\\\\.js$","test_preprocessor"],["^.+\\\\.css$","css-preprocessor"]]}', }; -}});" +}}); `; exports[`ScriptTransformer uses multiple preprocessors 2`] = ` -"({\\"Object.\\":function(module,exports,require,__dirname,__filename,global,jest){ +({"Object.":function(module,exports,require,__dirname,__filename,global,jest){ module.exports = { filename: /styles/App.css, rawFirstLine: root {, }; -}});" +}}); `; exports[`ScriptTransformer uses multiple preprocessors 3`] = ` -"({\\"Object.\\":function(module,exports,require,__dirname,__filename,global,jest){module.exports = \\"react\\"; -}});" +({"Object.":function(module,exports,require,__dirname,__filename,global,jest){module.exports = "react"; +}}); `; exports[`ScriptTransformer uses the supplied preprocessor 1`] = ` -"({\\"Object.\\":function(module,exports,require,__dirname,__filename,global,jest){ +({"Object.":function(module,exports,require,__dirname,__filename,global,jest){ const TRANSFORMED = { filename: '/fruits/banana.js', - script: 'module.exports = \\"banana\\";', - config: '{\\"cache\\":true,\\"cacheDirectory\\":\\"/cache/\\",\\"name\\":\\"test\\",\\"rootDir\\":\\"/\\",\\"transformIgnorePatterns\\":[\\"/node_modules/\\"],\\"transform\\":[[\\"^.+\\\\\\\\.js$\\",\\"test_preprocessor\\"]]}', + script: 'module.exports = "banana";', + config: '{"cache":true,"cacheDirectory":"/cache/","name":"test","rootDir":"/","transformIgnorePatterns":["/node_modules/"],"transform":[["^.+\\\\.js$","test_preprocessor"]]}', }; -}});" +}}); `; exports[`ScriptTransformer uses the supplied preprocessor 2`] = ` -"({\\"Object.\\":function(module,exports,require,__dirname,__filename,global,jest){module.exports = \\"react\\"; -}});" +({"Object.":function(module,exports,require,__dirname,__filename,global,jest){module.exports = "react"; +}}); `; diff --git a/packages/jest-snapshot/src/__tests__/utils.test.js b/packages/jest-snapshot/src/__tests__/utils.test.js index 294cf9f80b83..74e408110c5a 100644 --- a/packages/jest-snapshot/src/__tests__/utils.test.js +++ b/packages/jest-snapshot/src/__tests__/utils.test.js @@ -197,5 +197,5 @@ test('serialize handles \\r\\n', () => { const data = '
\r\n
'; const serializedData = serialize(data); - expect(serializedData).toBe('\n"
\n
"\n'); + expect(serializedData).toBe('\n
\n
\n'); }); diff --git a/packages/jest-util/src/__tests__/__snapshots__/fake_timers.test.js.snap b/packages/jest-util/src/__tests__/__snapshots__/fake_timers.test.js.snap index 235d2ba741f5..2322825c241f 100644 --- a/packages/jest-util/src/__tests__/__snapshots__/fake_timers.test.js.snap +++ b/packages/jest-util/src/__tests__/__snapshots__/fake_timers.test.js.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`FakeTimers runAllTimers warns when trying to advance timers while real timers are used 1`] = ` -"A function to advance timers was called but the timers API is not mocked with fake timers. Call \`jest.useFakeTimers()\` in this test or enable fake timers globally by setting \`\\"timers\\": \\"fake\\"\` in the configuration file. This warning is likely a result of a default configuration change in Jest 15. +A function to advance timers was called but the timers API is not mocked with fake timers. Call \`jest.useFakeTimers()\` in this test or enable fake timers globally by setting \`"timers": "fake"\` in the configuration file. This warning is likely a result of a default configuration change in Jest 15. -Release Blog Post: https://facebook.github.io/jest/blog/2016/09/01/jest-15.html" +Release Blog Post: https://facebook.github.io/jest/blog/2016/09/01/jest-15.html `; diff --git a/packages/jest-util/src/__tests__/__snapshots__/validate_cli_options.test.js.snap b/packages/jest-util/src/__tests__/__snapshots__/validate_cli_options.test.js.snap index ded89401533c..df08a19cebcc 100644 --- a/packages/jest-util/src/__tests__/__snapshots__/validate_cli_options.test.js.snap +++ b/packages/jest-util/src/__tests__/__snapshots__/validate_cli_options.test.js.snap @@ -1,22 +1,22 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`fails for multiple unknown options 1`] = ` -" Unrecognized CLI Parameters: - - Following options were not recognized: - [\\"jest\\", \\"test\\"] - - CLI Options Documentation: - http://facebook.github.io/jest/docs/cli.html -" + Unrecognized CLI Parameters: + + Following options were not recognized: + ["jest", "test"] + + CLI Options Documentation: + http://facebook.github.io/jest/docs/cli.html + `; exports[`fails for unknown option 1`] = ` -" Unrecognized CLI Parameter: - - Unrecognized option \\"unknown\\". - - CLI Options Documentation: - http://facebook.github.io/jest/docs/cli.html -" + Unrecognized CLI Parameter: + + Unrecognized option "unknown". + + CLI Options Documentation: + http://facebook.github.io/jest/docs/cli.html + `; diff --git a/packages/jest-validate/src/__tests__/__snapshots__/validate.test.js.snap b/packages/jest-validate/src/__tests__/__snapshots__/validate.test.js.snap index 309ba014957d..a50aa7d951e9 100644 --- a/packages/jest-validate/src/__tests__/__snapshots__/validate.test.js.snap +++ b/packages/jest-validate/src/__tests__/__snapshots__/validate.test.js.snap @@ -1,138 +1,138 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`displays warning for deprecated config options 1`] = ` -" Deprecation Warning: - - Option scriptPreprocessor was replaced by transform, which support multiple preprocessors. - - Jest now treats your current configuration as: - { - \\"transform\\": {\\".*\\": \\"test\\"} - } + Deprecation Warning: + + Option scriptPreprocessor was replaced by transform, which support multiple preprocessors. + + Jest now treats your current configuration as: + { + "transform": {".*": "test"} + } + + Please update your configuration. - Please update your configuration. -" `; exports[`displays warning for unknown config options 1`] = ` -" Validation Warning: + Validation Warning: + + Unknown option "unkwon" with value {} was found. Did you mean "unknown"? + This is probably a typing mistake. Fixing it will remove this message. - Unknown option \\"unkwon\\" with value {} was found. Did you mean \\"unknown\\"? - This is probably a typing mistake. Fixing it will remove this message. -" `; exports[`pretty prints valid config for Array 1`] = ` -" Validation Error: - - Option \\"coverageReporters\\" must be of type: - array - but instead received: - object - - Example: - { - \\"coverageReporters\\": [\\"json\\", \\"text\\", \\"lcov\\", \\"clover\\"] - } -" + Validation Error: + + Option "coverageReporters" must be of type: + array + but instead received: + object + + Example: + { + "coverageReporters": ["json", "text", "lcov", "clover"] + } + `; exports[`pretty prints valid config for Boolean 1`] = ` -" Validation Error: - - Option \\"automock\\" must be of type: - boolean - but instead received: - array - - Example: - { - \\"automock\\": false - } -" + Validation Error: + + Option "automock" must be of type: + boolean + but instead received: + array + + Example: + { + "automock": false + } + `; exports[`pretty prints valid config for Function 1`] = ` -" Validation Error: - - Option \\"fn\\" must be of type: - function - but instead received: - string - - Example: - { - \\"fn\\": (config, option, deprecatedOptions) => true - } -" + Validation Error: + + Option "fn" must be of type: + function + but instead received: + string + + Example: + { + "fn": (config, option, deprecatedOptions) => true + } + `; exports[`pretty prints valid config for Object 1`] = ` -" Validation Error: - - Option \\"haste\\" must be of type: - object - but instead received: - number - - Example: - { - \\"haste\\": {\\"providesModuleNodeModules\\": [\\"react\\", \\"react-native\\"]} - } -" + Validation Error: + + Option "haste" must be of type: + object + but instead received: + number + + Example: + { + "haste": {"providesModuleNodeModules": ["react", "react-native"]} + } + `; exports[`pretty prints valid config for String 1`] = ` -" Validation Error: - - Option \\"preset\\" must be of type: - string - but instead received: - number - - Example: - { - \\"preset\\": \\"react-native\\" - } -" + Validation Error: + + Option "preset" must be of type: + string + but instead received: + number + + Example: + { + "preset": "react-native" + } + `; exports[`works with custom deprecations 1`] = ` -"My Custom Deprecation Warning: - - Option scriptPreprocessor was replaced by transform, which support multiple preprocessors. - - Jest now treats your current configuration as: - { - \\"transform\\": {\\".*\\": \\"test\\"} - } - - Please update your configuration. - -My custom comment" +My Custom Deprecation Warning: + + Option scriptPreprocessor was replaced by transform, which support multiple preprocessors. + + Jest now treats your current configuration as: + { + "transform": {".*": "test"} + } + + Please update your configuration. + +My custom comment `; exports[`works with custom errors 1`] = ` -"My Custom Error: - - Option \\"test\\" must be of type: - array - but instead received: - string - - Example: - { - \\"test\\": [1, 2] - } - -My custom comment" +My Custom Error: + + Option "test" must be of type: + array + but instead received: + string + + Example: + { + "test": [1, 2] + } + +My custom comment `; exports[`works with custom warnings 1`] = ` -"My Custom Warning: - - Unknown option \\"unknown\\" with value \\"string\\" was found. - This is probably a typing mistake. Fixing it will remove this message. - -My custom comment" +My Custom Warning: + + Unknown option "unknown" with value "string" was found. + This is probably a typing mistake. Fixing it will remove this message. + +My custom comment `; diff --git a/packages/pretty-format/src/__tests__/__snapshots__/react.test.js.snap b/packages/pretty-format/src/__tests__/__snapshots__/react.test.js.snap index 827d083ea5a2..807585d4364b 100644 --- a/packages/pretty-format/src/__tests__/__snapshots__/react.test.js.snap +++ b/packages/pretty-format/src/__tests__/__snapshots__/react.test.js.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`ReactElement plugin highlights syntax 1`] = ` -" + prop={
mouse @@ -10,19 +10,19 @@ exports[`ReactElement plugin highlights syntax 1`] = `
} -/>" +/> `; exports[`ReactElement plugin highlights syntax with color from theme option 1`] = ` -" - style=\\"color:red\\" + + style="color:red" > Hello, Mouse! -" + `; exports[`ReactTestComponent plugin highlights syntax 1`] = ` -" + prop={
mouse @@ -31,13 +31,13 @@ exports[`ReactTestComponent plugin highlights syntax 1`] = `
} -/>" +/> `; exports[`ReactTestComponent plugin highlights syntax with color from theme option 1`] = ` -" - style=\\"color:red\\" + + style="color:red" > Hello, Mouse! -" + `; diff --git a/packages/pretty-format/src/__tests__/pretty_format.test.js b/packages/pretty-format/src/__tests__/pretty_format.test.js index 0cd01cd16772..644436532dc2 100644 --- a/packages/pretty-format/src/__tests__/pretty_format.test.js +++ b/packages/pretty-format/src/__tests__/pretty_format.test.js @@ -289,7 +289,7 @@ describe('prettyFormat()', () => { it('prints a multiline string', () => { const val = ['line 1', 'line 2', 'line 3'].join('\n'); - expect(prettyFormat(val)).toEqual('"' + val + '"'); + expect(prettyFormat(val)).toEqual(val); }); it('prints a multiline string as value of object property', () => { @@ -313,9 +313,9 @@ describe('prettyFormat()', () => { ' "children": Object {', ' "props": Object {', ' "id": "J",', - ' "points": "0.5,0.460', + ' "points": `0.5,0.460', '0.5,0.875', - '0.25,0.875",', + '0.25,0.875`,', ' },', ' "type": "polyline",', ' },', diff --git a/packages/pretty-format/src/__tests__/react.test.js b/packages/pretty-format/src/__tests__/react.test.js index fa65de01e10c..182e8ab8e0b6 100644 --- a/packages/pretty-format/src/__tests__/react.test.js +++ b/packages/pretty-format/src/__tests__/react.test.js @@ -110,9 +110,9 @@ test('supports props with multiline strings', () => { '', ' ', '', ].join('\n'); diff --git a/packages/pretty-format/src/index.js b/packages/pretty-format/src/index.js index 140de3b86211..e00a4f733f80 100644 --- a/packages/pretty-format/src/index.js +++ b/packages/pretty-format/src/index.js @@ -105,7 +105,9 @@ function printBasicValue( return printNumber(val); } if (typeOf === 'string') { - return '"' + val.replace(/"|\\/g, '\\$&') + '"'; + return /\n/.test(val) + ? '`' + val + '`' + : '"' + val.replace(/"|\\/g, '\\$&') + '"'; } if (typeOf === 'function') { return printFunction(val, printFunctionName); @@ -567,13 +569,19 @@ function createIndent(indent: number): string { return new Array(indent + 1).join(' '); } +function removeWrappingBackticks(str: string) { + return str.replace(/(^\s*)`|`(\s*)$/g, '$1$2'); +} + function prettyFormat(val: any, options?: OptionsReceived): string { if (options) { validateOptions(options); if (options.plugins) { const plugin = findPlugin(options.plugins, val); if (plugin !== null) { - return printPlugin(plugin, val, getConfig(options), '', 0, []); + return removeWrappingBackticks( + printPlugin(plugin, val, getConfig(options), '', 0, []), + ); } } } @@ -584,10 +592,12 @@ function prettyFormat(val: any, options?: OptionsReceived): string { getEscapeRegex(options), ); if (basicResult !== null) { - return basicResult; + return removeWrappingBackticks(basicResult); } - return printComplexValue(val, getConfig(options), '', 0, []); + return removeWrappingBackticks( + printComplexValue(val, getConfig(options), '', 0, []), + ); } prettyFormat.plugins = {