From 1be93158e1ee5a1d31ae4e30cf0443f915aa389e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Fri, 10 Mar 2017 17:01:01 +0100 Subject: [PATCH] Human-readable colors for jest-matchers snapshots (#3119) * Human-readable colors for jest-matchers snapshots * Use ConvertAnsi pretty-format plugin as snapshotSerializer * Convert ansi escapes in all snapshots --- package.json | 5 + .../formatTestNameByPattern-test.js.snap | 26 +- .../__snapshots__/highlight-test.js.snap | 76 +- .../__snapshots__/utils-test.js.snap | 20 +- .../__snapshots__/normalize-test.js.snap | 42 +- .../__tests__/__snapshots__/diff-test.js.snap | 46 +- .../__snapshots__/matchers-test.js.snap | 6 +- .../__snapshots__/index-test.js.snap | 20 +- .../__snapshots__/extend-test.js.snap | 2 +- .../__snapshots__/matchers-test.js.snap | 2424 ++++++++--------- .../__snapshots__/spyMatchers-test.js.snap | 280 +- .../toThrowMatchers-test.js.snap | 136 +- .../__snapshots__/messages-test.js.snap | 8 +- .../validateCLIOptions-test.js.snap | 16 +- .../__snapshots__/validate-test.js.snap | 100 +- .../__snapshots__/pretty-format-test.js.snap | 60 +- .../pretty-format/src/plugins/ConvertAnsi.js | 51 + 17 files changed, 1687 insertions(+), 1631 deletions(-) create mode 100644 packages/pretty-format/src/plugins/ConvertAnsi.js diff --git a/package.json b/package.json index d55f3240a257..72fadcbf4100 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,8 @@ { "private": true, "devDependencies": { + "ansi-regex": "^2.0.0", + "ansi-styles": "^3.0.0", "babel-core": "^6.23.1", "babel-eslint": "^7.1.1", "babel-plugin-syntax-trailing-function-commas": "^6.13.0", @@ -84,6 +86,9 @@ "^.+\\.js$": "/packages/babel-jest" }, "setupTestFrameworkScriptFile": "/testSetupFile.js", + "snapshotSerializers": [ + "/packages/pretty-format/build/plugins/ConvertAnsi.js" + ], "testEnvironment": "./packages/jest-environment-node", "testPathIgnorePatterns": [ "/node_modules/", diff --git a/packages/jest-cli/src/lib/__tests__/__snapshots__/formatTestNameByPattern-test.js.snap b/packages/jest-cli/src/lib/__tests__/__snapshots__/formatTestNameByPattern-test.js.snap index b660c992e17a..db0e46a1f88a 100644 --- a/packages/jest-cli/src/lib/__tests__/__snapshots__/formatTestNameByPattern-test.js.snap +++ b/packages/jest-cli/src/lib/__tests__/__snapshots__/formatTestNameByPattern-test.js.snap @@ -1,27 +1,27 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`for multiline test name returns test name with highlighted pattern and replaced line breaks 1`] = `"should⏎ name the ⏎function you at..."`; +exports[`for multiline test name returns test name with highlighted pattern and replaced line breaks 1`] = `"should⏎ name the ⏎function you at..."`; -exports[`for multiline test name returns test name with highlighted pattern and replaced line breaks 2`] = `"should⏎ name the ⏎function you at..."`; +exports[`for multiline test name returns test name with highlighted pattern and replaced line breaks 2`] = `"should⏎ name the ⏎function you at..."`; -exports[`for multiline test name returns test name with highlighted pattern and replaced line breaks 3`] = `"should⏎ name the ⏎function you at..."`; +exports[`for multiline test name returns test name with highlighted pattern and replaced line breaks 3`] = `"should⏎ name the ⏎function you at..."`; -exports[`for one line test name pattern in the middle test name with cutted tail and cutted highlighted pattern 1`] = `"should nam..."`; +exports[`for one line test name pattern in the middle test name with cutted tail and cutted highlighted pattern 1`] = `"should nam..."`; -exports[`for one line test name pattern in the middle test name with cutted tail and highlighted pattern 1`] = `"should name the functi..."`; +exports[`for one line test name pattern in the middle test name with cutted tail and highlighted pattern 1`] = `"should name the functi..."`; -exports[`for one line test name pattern in the middle test name with highlighted cutted 1`] = `"sho..."`; +exports[`for one line test name pattern in the middle test name with highlighted cutted 1`] = `"sho..."`; -exports[`for one line test name pattern in the middle test name with highlighted pattern returns 1`] = `"should name the function you attach"`; +exports[`for one line test name pattern in the middle test name with highlighted pattern returns 1`] = `"should name the function you attach"`; -exports[`for one line test name pattern in the tail returns test name with cutted tail and cutted highlighted pattern 1`] = `"should name the function you a..."`; +exports[`for one line test name pattern in the tail returns test name with cutted tail and cutted highlighted pattern 1`] = `"should name the function you a..."`; -exports[`for one line test name pattern in the tail returns test name with highlighted cutted 1`] = `"sho..."`; +exports[`for one line test name pattern in the tail returns test name with highlighted cutted 1`] = `"sho..."`; -exports[`for one line test name pattern in the tail returns test name with highlighted pattern 1`] = `"should name the function you attach"`; +exports[`for one line test name pattern in the tail returns test name with highlighted pattern 1`] = `"should name the function you attach"`; -exports[`for one line test name with pattern in the head returns test name with cutted tail and cutted highlighted pattern 1`] = `"shoul..."`; +exports[`for one line test name with pattern in the head returns test name with cutted tail and cutted highlighted pattern 1`] = `"shoul..."`; -exports[`for one line test name with pattern in the head returns test name with cutted tail and highlighted pattern 1`] = `"should name the function yo..."`; +exports[`for one line test name with pattern in the head returns test name with cutted tail and highlighted pattern 1`] = `"should name the function yo..."`; -exports[`for one line test name with pattern in the head returns test name with highlighted pattern 1`] = `"should name the function you attach"`; +exports[`for one line test name with pattern in the head returns test name with highlighted pattern 1`] = `"should name the function you attach"`; diff --git a/packages/jest-cli/src/lib/__tests__/__snapshots__/highlight-test.js.snap b/packages/jest-cli/src/lib/__tests__/__snapshots__/highlight-test.js.snap index 4ce34c19542e..803e3b8c5dd6 100644 --- a/packages/jest-cli/src/lib/__tests__/__snapshots__/highlight-test.js.snap +++ b/packages/jest-cli/src/lib/__tests__/__snapshots__/highlight-test.js.snap @@ -1,77 +1,77 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`dims everything when there is no match 1`] = `"jest-cli/__tests__/watch-test.js"`; +exports[`dims everything when there is no match 1`] = `"jest-cli/__tests__/watch-test.js"`; -exports[`dims everything when there is no match 2`] = `"...t-cli/__tests__/watch-test.js"`; +exports[`dims everything when there is no match 2`] = `"...t-cli/__tests__/watch-test.js"`; -exports[`dims everything when there is no match 3`] = `".../__tests__/watch-test.js"`; +exports[`dims everything when there is no match 3`] = `".../__tests__/watch-test.js"`; -exports[`dims everything when there is no match 4`] = `"...sts__/watch-test.js"`; +exports[`dims everything when there is no match 4`] = `"...sts__/watch-test.js"`; -exports[`dims everything when there is no match 5`] = `"...watch-test.js"`; +exports[`dims everything when there is no match 5`] = `"...watch-test.js"`; -exports[`dims everything when there is no match 6`] = `"...-test.js"`; +exports[`dims everything when there is no match 6`] = `"...-test.js"`; -exports[`dims everything when there is no match 7`] = `"....js"`; +exports[`dims everything when there is no match 7`] = `"....js"`; -exports[`dims everything when there is no match 8`] = `"./watch-test.js"`; +exports[`dims everything when there is no match 8`] = `"./watch-test.js"`; -exports[`highlight the trimmed part when there is only a rootDir match 1`] = `"jest-cli/__tests__/watch-test.js"`; +exports[`highlight the trimmed part when there is only a rootDir match 1`] = `"jest-cli/__tests__/watch-test.js"`; -exports[`highlight the trimmed part when there is only a rootDir match 2`] = `"...t-cli/__tests__/watch-test.js"`; +exports[`highlight the trimmed part when there is only a rootDir match 2`] = `"...t-cli/__tests__/watch-test.js"`; -exports[`highlight the trimmed part when there is only a rootDir match 3`] = `".../__tests__/watch-test.js"`; +exports[`highlight the trimmed part when there is only a rootDir match 3`] = `".../__tests__/watch-test.js"`; -exports[`highlight the trimmed part when there is only a rootDir match 4`] = `"...sts__/watch-test.js"`; +exports[`highlight the trimmed part when there is only a rootDir match 4`] = `"...sts__/watch-test.js"`; -exports[`highlight the trimmed part when there is only a rootDir match 5`] = `"...watch-test.js"`; +exports[`highlight the trimmed part when there is only a rootDir match 5`] = `"...watch-test.js"`; -exports[`highlight the trimmed part when there is only a rootDir match 6`] = `"...-test.js"`; +exports[`highlight the trimmed part when there is only a rootDir match 6`] = `"...-test.js"`; -exports[`highlight the trimmed part when there is only a rootDir match 7`] = `"....js"`; +exports[`highlight the trimmed part when there is only a rootDir match 7`] = `"....js"`; -exports[`highlight the trimmed part when there is only a rootDir match 8`] = `"./watch-test.js"`; +exports[`highlight the trimmed part when there is only a rootDir match 8`] = `"./watch-test.js"`; -exports[`highlights everything when there is a full match 1`] = `"jest-cli/__tests__/watch-test.js"`; +exports[`highlights everything when there is a full match 1`] = `"jest-cli/__tests__/watch-test.js"`; -exports[`highlights everything when there is a full match 2`] = `"...t-cli/__tests__/watch-test.js"`; +exports[`highlights everything when there is a full match 2`] = `"...t-cli/__tests__/watch-test.js"`; -exports[`highlights everything when there is a full match 3`] = `".../__tests__/watch-test.js"`; +exports[`highlights everything when there is a full match 3`] = `".../__tests__/watch-test.js"`; -exports[`highlights everything when there is a full match 4`] = `"...sts__/watch-test.js"`; +exports[`highlights everything when there is a full match 4`] = `"...sts__/watch-test.js"`; -exports[`highlights everything when there is a full match 5`] = `"...watch-test.js"`; +exports[`highlights everything when there is a full match 5`] = `"...watch-test.js"`; -exports[`highlights everything when there is a full match 6`] = `"...-test.js"`; +exports[`highlights everything when there is a full match 6`] = `"...-test.js"`; -exports[`highlights everything when there is a full match 7`] = `"....js"`; +exports[`highlights everything when there is a full match 7`] = `"....js"`; -exports[`highlights everything when there is a full match 8`] = `"./watch-test.js"`; +exports[`highlights everything when there is a full match 8`] = `"./watch-test.js"`; -exports[`highlights part of file name when there is a partially match of the file name 1`] = `"jest-cli/__tests__/watch-test.js"`; +exports[`highlights part of file name when there is a partially match of the file name 1`] = `"jest-cli/__tests__/watch-test.js"`; -exports[`highlights part of file name when there is a partially match of the file name 2`] = `"...t-cli/__tests__/watch-test.js"`; +exports[`highlights part of file name when there is a partially match of the file name 2`] = `"...t-cli/__tests__/watch-test.js"`; -exports[`highlights part of file name when there is a partially match of the file name 3`] = `".../__tests__/watch-test.js"`; +exports[`highlights part of file name when there is a partially match of the file name 3`] = `".../__tests__/watch-test.js"`; -exports[`highlights part of file name when there is a partially match of the file name 4`] = `"...sts__/watch-test.js"`; +exports[`highlights part of file name when there is a partially match of the file name 4`] = `"...sts__/watch-test.js"`; -exports[`highlights part of file name when there is a partially match of the file name 5`] = `"...watch-test.js"`; +exports[`highlights part of file name when there is a partially match of the file name 5`] = `"...watch-test.js"`; -exports[`highlights part of file name when there is a partially match of the file name 6`] = `"...-test.js"`; +exports[`highlights part of file name when there is a partially match of the file name 6`] = `"...-test.js"`; -exports[`highlights part of file name when there is a partially match of the file name 7`] = `"....js"`; +exports[`highlights part of file name when there is a partially match of the file name 7`] = `"....js"`; -exports[`highlights part of file name when there is a partially match of the file name 8`] = `"./watch-test.js"`; +exports[`highlights part of file name when there is a partially match of the file name 8`] = `"./watch-test.js"`; -exports[`highlights the trimmed part there is a non visible match 1`] = `"...t-cli/__tests__/watch-test.js"`; +exports[`highlights the trimmed part there is a non visible match 1`] = `"...t-cli/__tests__/watch-test.js"`; -exports[`highlights the trimmed part there is a non visible match 2`] = `".../__tests__/watch-test.js"`; +exports[`highlights the trimmed part there is a non visible match 2`] = `".../__tests__/watch-test.js"`; -exports[`highlights the trimmed part there is a non visible match 3`] = `"...sts__/watch-test.js"`; +exports[`highlights the trimmed part there is a non visible match 3`] = `"...sts__/watch-test.js"`; -exports[`highlights the trimmed part there is a non visible match 4`] = `"...watch-test.js"`; +exports[`highlights the trimmed part there is a non visible match 4`] = `"...watch-test.js"`; -exports[`highlights the trimmed part there is a non visible match 5`] = `"...-test.js"`; +exports[`highlights the trimmed part there is a non visible match 5`] = `"...-test.js"`; -exports[`highlights the trimmed part there is a non visible match 6`] = `"....js"`; +exports[`highlights the trimmed part there is a non visible match 6`] = `"....js"`; 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 a359b563e3ca..27b939ba8e4f 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 @@ -1,23 +1,23 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`trimAndFormatPath() does not trim anything 1`] = `"1234567890/1234567890/1234.js"`; +exports[`trimAndFormatPath() does not trim anything 1`] = `"1234567890/1234567890/1234.js"`; -exports[`trimAndFormatPath() split at the path.sep index 1`] = `".../1234.js"`; +exports[`trimAndFormatPath() split at the path.sep index 1`] = `".../1234.js"`; -exports[`trimAndFormatPath() trims dirname (longer line width) 1`] = `"...890/1234567890/1234.js"`; +exports[`trimAndFormatPath() trims dirname (longer line width) 1`] = `"...890/1234567890/1234.js"`; -exports[`trimAndFormatPath() trims dirname 1`] = `"...234567890/1234.js"`; +exports[`trimAndFormatPath() trims dirname 1`] = `"...234567890/1234.js"`; -exports[`trimAndFormatPath() trims dirname and basename 1`] = `"...1234.js"`; +exports[`trimAndFormatPath() trims dirname and basename 1`] = `"...1234.js"`; exports[`wrapAnsiString() returns the string unaltered if given a terminal width of zero 1`] = `"This string shouldn't cause you any trouble"`; 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- -bold 12344 -56bcd 123t +"abcde red- +bold 12344 +56bcd 123t tttttththt hththththt hththththt @@ -25,8 +25,8 @@ hththththt hthththtet etetetette tetetetete -tetetestnh -snthsnthss +tetetestnh +snthsnthss 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 d737c3056952..e258773b577e 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: +" Deprecation Warning: - Option \\"preprocessorIgnorePatterns\\" was replaced by \\"transformIgnorePatterns\\", which support multiple preprocessors. + Option \\"preprocessorIgnorePatterns\\" was replaced by \\"transformIgnorePatterns\\", which support multiple preprocessors. Jest now treats your current configuration as: { - \\"transformIgnorePatterns\\": [\\"bar/baz\\", \\"qux/quux\\"] + \\"transformIgnorePatterns\\": [\\"bar/baz\\", \\"qux/quux\\"] } Please update your configuration. - Configuration Documentation: + Configuration Documentation: https://facebook.github.io/jest/docs/configuration.html -" +" `; exports[`preset throws when preset not found 1`] = ` -"● Validation Error: +"Validation Error: - Preset doesnt-exist not found. + Preset doesnt-exist not found. - Configuration Documentation: + Configuration Documentation: https://facebook.github.io/jest/docs/configuration.html -" +" `; exports[`rootDir throws if the config is missing a rootDir property 1`] = ` -"● Validation Error: +"Validation Error: - Configuration option rootDir must be specified. + Configuration option rootDir must be specified. - Configuration Documentation: + Configuration Documentation: https://facebook.github.io/jest/docs/configuration.html -" +" `; exports[`testEnvironment throws on invalid environment names 1`] = ` -"● Validation Error: +"Validation Error: - Test environment phantom cannot be found. Make sure the testEnvironment configuration option points to an existing node module. + Test environment phantom cannot be found. Make sure the testEnvironment configuration option points to an existing node module. - Configuration Documentation: + Configuration Documentation: https://facebook.github.io/jest/docs/configuration.html -" +" `; exports[`testMatch throws if testRegex and testMatch are both specified 1`] = ` -"● Validation Error: +"Validation Error: - Configuration options testMatch and testRegex cannot be used together. + Configuration options testMatch and testRegex cannot be used together. - Configuration Documentation: + 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 f236c580d46d..e01e56d8cf13 100644 --- a/packages/jest-diff/src/__tests__/__snapshots__/diff-test.js.snap +++ b/packages/jest-diff/src/__tests__/__snapshots__/diff-test.js.snap @@ -1,34 +1,34 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`collapses big diffs to patch format 1`] = ` -"- Expected -+ Received +"- Expected ++ Received -@@ -6,9 +6,9 @@ - 4, - 5, - 6, - 7, - 8, -+ 10, - 9, -- 10, - ], - }" +@@ -6,9 +6,9 @@ + 4, + 5, + 6, + 7, + 8, ++ 10, + 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 +- Expected ++ Received -  Object { --  \\"line\\": 1, -+  \\"line\\": 2, -   \\"toJSON\\": [Function toJSON], -  }" + Object { +- \\"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."`; +exports[`prints a fallback message if two objects truly look identical 1`] = `"Compared values have no visual difference."`; 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 bf60bb1a78c6..ab86a24dc19f 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 + 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 b4c01d9071ab..a25786610f30 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,21 +5,21 @@ 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: -- Expected -+ Received +- Expected ++ Received - Object { -- \\"b\\": 1, -+ \\"a\\": 1, - \\"toJSON\\": [Function toJSON], - }" + Object { +- \\"b\\": 1, ++ \\"a\\": 1, + \\"toJSON\\": [Function toJSON], + }" `; diff --git a/packages/jest-matchers/src/__tests__/__snapshots__/extend-test.js.snap b/packages/jest-matchers/src/__tests__/__snapshots__/extend-test.js.snap index 4ef46beb012f..7565cb732261 100644 --- a/packages/jest-matchers/src/__tests__/__snapshots__/extend-test.js.snap +++ b/packages/jest-matchers/src/__tests__/__snapshots__/extend-test.js.snap @@ -2,4 +2,4 @@ exports[`is available globally 1`] = `"expected 15 to be divisible by 2"`; -exports[`is ok if there is no message specified 1`] = `"No message was specified for this matcher."`; +exports[`is ok if there is no message specified 1`] = `"No message was specified for this matcher."`; 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 862c69a08131..b9d2dd73753b 100644 --- a/packages/jest-matchers/src/__tests__/__snapshots__/matchers-test.js.snap +++ b/packages/jest-matchers/src/__tests__/__snapshots__/matchers-test.js.snap @@ -1,3278 +1,3278 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP 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: -- Expected -+ Received +- Expected ++ Received --Object {} -+Object { -+ \\"circular\\": [Circular], -+}" +-Object {} ++Object { ++ \\"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 '1' with '.not' 1`] = ` -"expect(received).not.toBe(expected) +"expect(received).not.toBe(expected) Expected value to not be (using ===): - 1 + 1 Received: - 1" + 1" `; exports[`.toBe() fails for 'Array []' with '.not' 1`] = ` -"expect(received).not.toBe(expected) +"expect(received).not.toBe(expected) Expected value to not be (using ===): - Array [] + Array [] Received: - Array []" + Array []" `; 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 + 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 + 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 + 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: {"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: -- Expected -+ Received +- Expected ++ Received - Object { -- \\"a\\": 5, -+ \\"a\\": 1, - }" + Object { +- \\"a\\": 5, ++ \\"a\\": 1, + }" `; exports[`.toBe() fails for: {} and {} 1`] = ` -"expect(received).toBe(expected) +"expect(received).toBe(expected) Expected value to be (using ===): - {} + {} 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 + 2 Received: - 1" + 1" `; exports[`.toBe() fails for: Array [] and Array [] 1`] = ` -"expect(received).toBe(expected) +"expect(received).toBe(expected) Expected value to be (using ===): - Array [] + Array [] Received: - Array [] + Array [] Difference: -Compared values have no visual difference." +Compared values have no visual difference." `; exports[`.toBe() fails for: null and undefined 1`] = ` -"expect(received).toBe(expected) +"expect(received).toBe(expected) Expected value to be (using ===): - undefined + undefined Received: - null + null 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 + false Received: - true" + true" `; 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 +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 +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 +Expected value not to be close to (with 0-digit precision): + 0.1 Received: - 0" + 0" `; exports[`.toBeCloseTo() passes: [0, 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 +Expected value not to be close to (with 2-digit precision): + 0.001 Received: - 0" + 0" `; exports[`.toBeCloseTo() passes: [0, 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 +Expected value not to be close to (with 2-digit precision): + 0 Received: - 0" + 0" `; exports[`.toBeCloseTo() passes: [1.23, 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 +Expected value not to be close to (with 2-digit precision): + 1.225 Received: - 1.23" + 1.23" `; exports[`.toBeCloseTo() passes: [1.23, 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 +Expected value not to be close to (with 2-digit precision): + 1.226 Received: - 1.23" + 1.23" `; exports[`.toBeCloseTo() passes: [1.23, 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 +Expected value not to be close to (with 2-digit precision): + 1.229 Received: - 1.23" + 1.23" `; exports[`.toBeCloseTo() passes: [1.23, 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 +Expected value not to be close to (with 2-digit precision): + 1.234 Received: - 1.23" + 1.23" `; 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 +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 +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 +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() '[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() 'Array []' is defined 1`] = ` -"expect(received).not.toBeDefined() +"expect(received).not.toBeDefined() Expected value not to be defined, instead received - Array []" + Array []" `; exports[`.toBeDefined(), .toBeUndefined() 'Array []' is defined 2`] = ` -"expect(received).toBeUndefined() +"expect(received).toBeUndefined() Expected value to be undefined, instead received - Array []" + Array []" `; 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 + -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 + -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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + -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 + -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 + 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 + 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 + -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 + -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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + true Constructor: - \\"Boolean\\"" + \\"Boolean\\"" `; 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 Array [] 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: - Array [] + Array [] " `; 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 {} + 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() passes 1`] = ` -"expect(received).not.toBeNaN() +"expect(received).not.toBeNaN() Expected value not to be NaN, instead received - NaN" + NaN" `; exports[`.toBeNaN() passes 2`] = ` -"expect(received).not.toBeNaN() +"expect(received).not.toBeNaN() Expected value not to be NaN, instead received - NaN" + NaN" `; exports[`.toBeNaN() passes 3`] = ` -"expect(received).not.toBeNaN() +"expect(received).not.toBeNaN() Expected value not to be NaN, instead received - NaN" + NaN" `; exports[`.toBeNaN() passes 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 - Array []" + Array []" `; 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 '[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 'Array []' with .not 1`] = ` -"expect(received).toBeNull() +"expect(received).toBeNull() Expected value to be null, instead received - Array []" + Array []" `; 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() '[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() 'Array []' is truthy 1`] = ` -"expect(received).not.toBeTruthy() +"expect(received).not.toBeTruthy() Expected value not to be truthy, instead received - Array []" + Array []" `; exports[`.toBeTruthy(), .toBeFalsy() 'Array []' is truthy 2`] = ` -"expect(received).toBeFalsy() +"expect(received).toBeFalsy() Expected value to be falsy, instead received - Array []" + Array []" `; 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() '[{}, Array []]' does not contain '{}' 1`] = ` -"expect(array).toContain(value) +"expect(array).toContain(value) Expected array: - [{}, Array []] + [{}, Array []] To contain value: - {}" + {}" `; exports[`.toContain(), .toContainEqual() '[{}, Array []]' does not contain 'Array []' 1`] = ` -"expect(array).toContain(value) +"expect(array).toContain(value) Expected array: - [{}, Array []] + [{}, Array []] To contain value: - Array []" + Array []" `; exports[`.toContain(), .toContainEqual() '[0, 1]' contains '1' 1`] = ` -"expect(object).not.toContain(value) +"expect(object).not.toContain(value) Expected object: - [0, 1] + [0, 1] Not to contain value: - 1 + 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] + [0, 1] Not to contain a value equal to: - 1 + 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] + [1, 2, 3, 4] Not to contain value: - 1 + 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] + [1, 2, 3, 4] Not to contain a value equal to: - 1 + 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] + [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)] + [Symbol(a)] Not to contain value: - Symbol(a) + 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)] + [Symbol(a)] Not to contain a value equal to: - Symbol(a) + Symbol(a) " `; exports[`.toContain(), .toContainEqual() '[null, undefined]' does not contain '1' 1`] = ` -"expect(array).toContain(value) +"expect(array).toContain(value) Expected array: - [null, undefined] + [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] + [undefined, null] Not to contain value: - null + null " `; exports[`.toContain(), .toContainEqual() '[undefined, null]' contains 'undefined' 1`] = ` -"expect(array).not.toContain(value) +"expect(array).not.toContain(value) Expected array: - [undefined, null] + [undefined, null] Not to contain value: - undefined + 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] + [undefined, null] Not to contain a value equal to: - null + 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] + [undefined, null] Not to contain a value equal to: - undefined + 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} + Set {1, 2, 3, 4} Not to contain a value equal to: - 1 + 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" +Expected collection to be an array-like structure. +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" +Expected collection to be an array-like structure. +Received: null" `; exports[`.toEqual() 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() 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() 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() 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() expect("abcd").not.toEqual(StringMatching /bc/) 1`] = ` -"expect(received).not.toEqual(expected) +"expect(received).not.toEqual(expected) Expected value to not equal: - StringMatching /bc/ + StringMatching /bc/ Received: - \\"abcd\\"" + \\"abcd\\"" `; exports[`.toEqual() 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() expect("abd").toEqual(StringMatching /bc/i) 1`] = ` -"expect(received).toEqual(expected) +"expect(received).toEqual(expected) Expected value to equal: - StringMatching /bc/i + StringMatching /bc/i Received: - \\"abd\\"" + \\"abd\\"" `; exports[`.toEqual() expect("banana").toEqual("apple") 1`] = ` -"expect(received).toEqual(expected) +"expect(received).toEqual(expected) Expected value to equal: - \\"apple\\" + \\"apple\\" Received: - \\"banana\\"" + \\"banana\\"" `; exports[`.toEqual() 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] + ArrayContaining [2, 3] Received: - [1, 2, 3]" + [1, 2, 3]" `; exports[`.toEqual() expect([1, 3]).toEqual(ArrayContaining [1, 2]) 1`] = ` -"expect(received).toEqual(expected) +"expect(received).toEqual(expected) Expected value to equal: - ArrayContaining [1, 2] + ArrayContaining [1, 2] Received: - [1, 3] + [1, 3] Difference: -- Expected -+ Received +- Expected ++ Received --ArrayContaining [ -+Array [ - 1, -- 2, -+ 3, - ]" +-ArrayContaining [ ++Array [ + 1, +- 2, ++ 3, + ]" `; exports[`.toEqual() expect([Function anonymous]).not.toEqual(Any) 1`] = ` -"expect(received).not.toEqual(expected) +"expect(received).not.toEqual(expected) Expected value to not equal: - Any + Any Received: - [Function anonymous]" + [Function anonymous]" `; exports[`.toEqual() 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() 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() 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: -- Expected -+ Received +- Expected ++ Received --ObjectContaining { -- \\"a\\": 2, -+Object { -+ \\"a\\": 1, -+ \\"b\\": 2, - }" +-ObjectContaining { +- \\"a\\": 2, ++Object { ++ \\"a\\": 1, ++ \\"b\\": 2, + }" `; exports[`.toEqual() 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: -- Expected -+ Received +- Expected ++ Received - Object { -- \\"b\\": 6, -+ \\"a\\": 5, - }" + Object { +- \\"b\\": 6, ++ \\"a\\": 5, + }" `; exports[`.toEqual() 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() expect(0).toEqual(-0) 1`] = ` -"expect(received).toEqual(expected) +"expect(received).toEqual(expected) Expected value to equal: - -0 + -0 Received: - 0 + 0 Difference: -Compared values have no visual difference." +Compared values have no visual difference." `; exports[`.toEqual() expect(1).not.toEqual(1) 1`] = ` -"expect(received).not.toEqual(expected) +"expect(received).not.toEqual(expected) Expected value to not equal: - 1 + 1 Received: - 1" + 1" `; exports[`.toEqual() expect(1).toEqual(2) 1`] = ` -"expect(received).toEqual(expected) +"expect(received).toEqual(expected) Expected value to equal: - 2 + 2 Received: - 1" + 1" `; exports[`.toEqual() expect(1).toEqual(ArrayContaining [1, 2]) 1`] = ` -"expect(received).toEqual(expected) +"expect(received).toEqual(expected) Expected value to equal: - ArrayContaining [1, 2] + ArrayContaining [1, 2] Received: - 1 + 1 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() 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} + Set {1, 2} Received: - Set {1, 2}" + Set {1, 2}" `; exports[`.toEqual() expect(Set {1, 2}).toEqual(Set {2, 1}) 1`] = ` -"expect(received).toEqual(expected) +"expect(received).toEqual(expected) Expected value to equal: - Set {2, 1} + Set {2, 1} Received: - Set {1, 2} + Set {1, 2} Difference: -Compared values have no visual difference." +Compared values have no visual difference." `; exports[`.toEqual() 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 + 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() expect(null).toEqual(undefined) 1`] = ` -"expect(received).toEqual(expected) +"expect(received).toEqual(expected) Expected value to equal: - undefined + undefined Received: - null + null 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() expect(true).not.toEqual(Anything) 1`] = ` -"expect(received).not.toEqual(expected) +"expect(received).not.toEqual(expected) Expected value to not equal: - Anything + Anything Received: - true" + true" `; exports[`.toEqual() expect(true).not.toEqual(true) 1`] = ` -"expect(received).not.toEqual(expected) +"expect(received).not.toEqual(expected) Expected value to not equal: - true + true Received: - true" + true" `; exports[`.toEqual() expect(true).toEqual(false) 1`] = ` -"expect(received).toEqual(expected) +"expect(received).toEqual(expected) Expected value to equal: - false + false Received: - true" + true" `; exports[`.toEqual() expect(undefined).toEqual(Any) 1`] = ` -"expect(received).toEqual(expected) +"expect(received).toEqual(expected) Expected value to equal: - Any + Any Received: - undefined + undefined 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() expect(undefined).toEqual(Anything) 1`] = ` -"expect(received).toEqual(expected) +"expect(received).toEqual(expected) Expected value to equal: - Anything + Anything Received: - undefined" + undefined" `; 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 + 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 + undefined " `; exports[`.toHaveLength expect("").toHaveLength(0) 1`] = ` -"expect(received).not.toHaveLength(length) +"expect(received).not.toHaveLength(length) Expected value to not have length: - 0 + 0 Received: - \\"\\" + \\"\\" received.length: - 0" + 0" `; exports[`.toHaveLength expect("").toHaveLength(1) 1`] = ` -"expect(received).toHaveLength(length) +"expect(received).toHaveLength(length) Expected value to have length: - 1 + 1 Received: - \\"\\" + \\"\\" received.length: - 0" + 0" `; exports[`.toHaveLength expect("abc").toHaveLength(3) 1`] = ` -"expect(received).not.toHaveLength(length) +"expect(received).not.toHaveLength(length) Expected value to not have length: - 3 + 3 Received: - \\"abc\\" + \\"abc\\" received.length: - 3" + 3" `; exports[`.toHaveLength expect("abc").toHaveLength(66) 1`] = ` -"expect(received).toHaveLength(length) +"expect(received).toHaveLength(length) Expected value to have length: - 66 + 66 Received: - \\"abc\\" + \\"abc\\" received.length: - 3" + 3" `; exports[`.toHaveLength expect(["a", "b"]).toHaveLength(2) 1`] = ` -"expect(received).not.toHaveLength(length) +"expect(received).not.toHaveLength(length) Expected value to not have length: - 2 + 2 Received: - [\\"a\\", \\"b\\"] + [\\"a\\", \\"b\\"] received.length: - 2" + 2" `; exports[`.toHaveLength expect(["a", "b"]).toHaveLength(99) 1`] = ` -"expect(received).toHaveLength(length) +"expect(received).toHaveLength(length) Expected value to have length: - 99 + 99 Received: - [\\"a\\", \\"b\\"] + [\\"a\\", \\"b\\"] received.length: - 2" + 2" `; exports[`.toHaveLength expect([1, 2]).toHaveLength(2) 1`] = ` -"expect(received).not.toHaveLength(length) +"expect(received).not.toHaveLength(length) Expected value to not have length: - 2 + 2 Received: - [1, 2] + [1, 2] received.length: - 2" + 2" `; exports[`.toHaveLength expect([1, 2]).toHaveLength(3) 1`] = ` -"expect(received).toHaveLength(length) +"expect(received).toHaveLength(length) Expected value to have length: - 3 + 3 Received: - [1, 2] + [1, 2] received.length: - 2" + 2" `; exports[`.toHaveLength expect(Array []).toHaveLength(0) 1`] = ` -"expect(received).not.toHaveLength(length) +"expect(received).not.toHaveLength(length) Expected value to not have length: - 0 + 0 Received: - Array [] + Array [] received.length: - 0" + 0" `; exports[`.toHaveLength expect(Array []).toHaveLength(1) 1`] = ` -"expect(received).toHaveLength(length) +"expect(received).toHaveLength(length) Expected value to have length: - 1 + 1 Received: - Array [] + Array [] received.length: - 0" + 0" `; 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" +Expected path to be a string. Received: + 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" +Expected path to be a string. Received: + 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" +Expected path to be a string. Received: + 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" +Expected object to be an object. Received: + 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" +Expected object to be an object. Received: + 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 + 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 + 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 + 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 +- Expected ++ Received - Object { -- \\"c\\": 4, -+ \\"c\\": 5, - }" + Object { +- \\"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 + 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 + 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 + 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 + 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 + 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 + 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 + 0 " `; exports[`.toMatch() passes: [Foo bar, /^foo/i] 1`] = ` -"expect(received).not.toMatch(expected) +"expect(received).not.toMatch(expected) Expected value not to match: - /^foo/i + /^foo/i Received: - \\"Foo bar\\"" + \\"Foo bar\\"" `; exports[`.toMatch() passes: [foo, 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. +string value must be a string. Received: - regexp: /foo/i" + regexp: /foo/i" `; 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. +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. +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. +string value must be a string. Received: - number: 1" + number: 1" `; exports[`.toMatch() throws if non String actual value passed: [Array [], "foo"] 1`] = ` -"expect(string)[.not].toMatch(expected) +"expect(string)[.not].toMatch(expected) -string value must be a string. +string value must be a string. Received: - array: Array []" + array: Array []" `; 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. +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" +string value must be a string. +Received: undefined" `; 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 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 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 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", Array []] 1`] = ` -"expect(string)[.not].toMatch(expected) +"expect(string)[.not].toMatch(expected) -expected value must be a string or a regular expression. +expected value must be a string or a regular expression. Expected: - array: Array []" + array: Array []" `; 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 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 value must be a string or a regular expression. +Expected: undefined" `; exports[`.toMatch() throws: [bar, /foo/] 1`] = ` -"expect(received).toMatch(expected) +"expect(received).toMatch(expected) Expected value to match: - /foo/ + /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] + [-0] Received: - [0] + [0] Difference: -- Expected -+ Received +- Expected ++ Received - Array [ -- -0, -+ 0, - ]" + 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] + [1, 2, 2] Received: - [1, 2, 3] + [1, 2, 3] Difference: -- Expected -+ Received +- Expected ++ Received - Array [ - 1, - 2, -- 2, -+ 3, - ]" + Array [ + 1, + 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] + [2, 3, 1] Received: - [1, 2, 3] + [1, 2, 3] Difference: -- Expected -+ Received +- Expected ++ Received - Array [ -+ 1, - 2, - 3, -- 1, - ]" + Array [ ++ 1, + 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] + [1, 3] Received: - [1, 2] + [1, 2] Difference: -- Expected -+ Received +- Expected ++ Received - Array [ - 1, -- 3, -+ 2, - ]" + Array [ + 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 +- Expected ++ Received - Object { -- \\"a\\": Any, -+ \\"a\\": \\"a\\", - }" + Object { +- \\"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 +- Expected ++ Received - Object { -- \\"a\\": \\"b!\\", -+ \\"a\\": \\"b\\", - \\"c\\": \\"d\\", - }" + Object { +- \\"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 +- Expected ++ Received - Object { -- \\"e\\": \\"b\\", -+ \\"a\\": \\"b\\", -+ \\"c\\": \\"d\\", - }" + Object { +- \\"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 +- Expected ++ Received - Object { - \\"a\\": \\"b\\", - \\"t\\": Object { -- \\"z\\": Array [ -- 3, -- ], -+ \\"z\\": \\"z\\", - }, - }" + Object { + \\"a\\": \\"b\\", + \\"t\\": Object { +- \\"z\\": Array [ +- 3, +- ], ++ \\"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 +- Expected ++ Received - Object { - \\"t\\": Object { -- \\"l\\": Object { -+ \\"x\\": Object { - \\"r\\": \\"r\\", - }, -+ \\"z\\": \\"z\\", - }, - }" + Object { + \\"t\\": Object { +- \\"l\\": Object { ++ \\"x\\": Object { + \\"r\\": \\"r\\", + }, ++ \\"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 +- Expected ++ Received - Object { - \\"a\\": Array [ - Object { -- \\"a\\": \\"c\\", -+ \\"a\\": \\"a\\", - }, - ], - }" + Object { + \\"a\\": Array [ + Object { +- \\"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 +- Expected ++ Received - Object { - \\"a\\": Array [ -+ 3, -+ 4, - \\"v\\", - ], - }" + Object { + \\"a\\": Array [ ++ 3, ++ 4, + \\"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 +- Expected ++ Received - Object { - \\"a\\": Array [ - 3, - 4, - 5, -- 6, - ], - }" + Object { + \\"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 +- Expected ++ Received - Object { - \\"a\\": Array [ - 3, - 4, -+ 5, - ], - }" + Object { + \\"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 +- Expected ++ Received - Object { -- \\"a\\": Object { -- \\"b\\": 4, -- }, -+ \\"a\\": Array [ -+ 3, -+ 4, -+ 5, -+ ], - }" + Object { +- \\"a\\": Object { +- \\"b\\": 4, +- }, ++ \\"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 +- Expected ++ Received - Object { -- \\"a\\": Object { -- \\"b\\": Any, -- }, -+ \\"a\\": Array [ -+ 3, -+ 4, -+ 5, -+ ], - }" + Object { +- \\"a\\": Object { +- \\"b\\": Any, +- }, ++ \\"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 +- Expected ++ Received - Object { - \\"d\\": Object { - \\"e\\": Object { -- \\"f\\": 222, -+ \\"f\\": 555, - }, - }, - }" + Object { + \\"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 +- Expected ++ Received - Object { -- \\"a\\": 2015-10-10T00:00:00.000Z, -+ \\"a\\": 2015-11-30T00:00:00.000Z, - }" + Object { +- \\"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 +- Expected ++ Received - Object { -- \\"a\\": \\"4\\", -+ \\"a\\": null, - }" + Object { +- \\"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 +- Expected ++ Received - Object { -- \\"a\\": undefined, -+ \\"a\\": null, - }" + Object { +- \\"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 +- Expected ++ Received - Object { -- \\"a\\": null, -+ \\"a\\": undefined, - }" + Object { +- \\"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: -- Expected -+ Received +- Expected ++ Received --Object { -- \\"a\\": undefined, --} -+Object {}" +-Object { +- \\"a\\": undefined, +-} ++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 + 2015-10-10T00:00:00.000Z Received: - 2015-11-30T00:00:00.000Z + 2015-11-30T00:00:00.000Z Difference: -- Expected -+ Received +- Expected ++ Received --2015-10-10T00:00:00.000Z -+2015-11-30T00:00:00.000Z" +-2015-10-10T00: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} + Set {2, 1} Received: - Set {1, 2} + Set {1, 2} Difference: -Compared values have no visual difference." +Compared values have no visual difference." `; 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] + [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 + 2015-11-30T00:00:00.000Z Received: - 2015-11-30T00:00:00.000Z" + 2015-11-30T00:00:00.000Z" `; exports[`toMatchObject() {pass: true} expect(Array []).toMatchObject(Array []) 1`] = ` -"expect(received).not.toMatchObject(expected) +"expect(received).not.toMatchObject(expected) Expected value not to match object: - Array [] + Array [] Received: - Array []" + Array []" `; 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} + 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 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 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 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 value must be an object. +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 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 value must be an object. +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 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 value must be an object. +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 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 value must be an object. +Received: undefined" `; diff --git a/packages/jest-matchers/src/__tests__/__snapshots__/spyMatchers-test.js.snap b/packages/jest-matchers/src/__tests__/__snapshots__/spyMatchers-test.js.snap index 6475dd88a6a6..4a246ee70a63 100644 --- a/packages/jest-matchers/src/__tests__/__snapshots__/spyMatchers-test.js.snap +++ b/packages/jest-matchers/src/__tests__/__snapshots__/spyMatchers-test.js.snap @@ -1,450 +1,450 @@ // 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. +jest.fn() value must be a mock function or spy. Received: - function: [Function fn]" + function: [Function fn]" `; exports[`lastCalledWith works with jest.fn and 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: - [\\"foo\\", \\"bar\\"] + [\\"foo\\", \\"bar\\"] But it was last called with: - [\\"foo\\", \\"bar1\\"]" + [\\"foo\\", \\"bar1\\"]" `; exports[`lastCalledWith works with jest.fn and 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 jest.fn and 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 jest.fn and 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: - [\\"foo\\", \\"bar\\"] + [\\"foo\\", \\"bar\\"] But it was last called with: - [\\"foo\\", \\"bar3\\"] -and two more calls." + [\\"foo\\", \\"bar3\\"] +and two more calls." `; exports[`lastCalledWith works with jest.fn 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[`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. +jest.fn() value must be a mock function or spy. Received: - function: [Function fn]" + function: [Function fn]" `; exports[`toBeCalled works with jasmine.createSpy 1`] = ` -"expect(spy).toBeCalled() +"expect(spy).toBeCalled() Expected spy to have been called." `; exports[`toBeCalled works with jasmine.createSpy 2`] = ` -"expect(spy).not.toBeCalled() +"expect(spy).not.toBeCalled() Expected spy not to be called but it was called with: - Array []" + Array []" `; exports[`toBeCalled works with jasmine.createSpy 3`] = ` -"expect(received)[.not].toBeCalled() +"expect(received)[.not].toBeCalled() Matcher does not accept any arguments. Got: - number: 555" + number: 555" `; exports[`toBeCalled works with jest.fn 1`] = ` -"expect(jest.fn()).toBeCalled() +"expect(jest.fn()).toBeCalled() 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: - Array []" + Array []" `; 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. +jest.fn() value must be a mock function or spy. Received: - function: [Function fn]" + function: [Function fn]" `; exports[`toBeCalledWith works with jest.fn and arguments that don't match 1`] = ` -"expect(jest.fn()).toBeCalledWith(expected) +"expect(jest.fn()).toBeCalledWith(expected) Expected mock function to have been called with: - [\\"foo\\", \\"bar\\"] + [\\"foo\\", \\"bar\\"] But it was called with: - [\\"foo\\", \\"bar1\\"]" + [\\"foo\\", \\"bar1\\"]" `; exports[`toBeCalledWith works with jest.fn and arguments that match 1`] = ` -"expect(jest.fn()).not.toBeCalledWith(expected) +"expect(jest.fn()).not.toBeCalledWith(expected) Expected mock function not to have been called with: - [\\"foo\\", \\"bar\\"]" + [\\"foo\\", \\"bar\\"]" `; exports[`toBeCalledWith works with jest.fn and many arguments 1`] = ` -"expect(jest.fn()).not.toBeCalledWith(expected) +"expect(jest.fn()).not.toBeCalledWith(expected) Expected mock function not to have been called with: - [\\"foo\\", \\"bar\\"]" + [\\"foo\\", \\"bar\\"]" `; exports[`toBeCalledWith works with jest.fn and many arguments that don't match 1`] = ` -"expect(jest.fn()).toBeCalledWith(expected) +"expect(jest.fn()).toBeCalledWith(expected) Expected mock function to have been called with: - [\\"foo\\", \\"bar\\"] + [\\"foo\\", \\"bar\\"] But it was called with: - [\\"foo\\", \\"bar3\\"], [\\"foo\\", \\"bar2\\"], [\\"foo\\", \\"bar1\\"]" + [\\"foo\\", \\"bar3\\"], [\\"foo\\", \\"bar2\\"], [\\"foo\\", \\"bar1\\"]" `; exports[`toBeCalledWith works with jest.fn when not called 1`] = ` -"expect(jest.fn()).toBeCalledWith(expected) +"expect(jest.fn()).toBeCalledWith(expected) Expected mock function to have been called with: - [\\"foo\\", \\"bar\\"] -But it was not called." + [\\"foo\\", \\"bar\\"] +But it was not called." `; 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. +jest.fn() value must be a mock function or spy. Received: - function: [Function fn]" + function: [Function fn]" `; exports[`toHaveBeenCalled works with jasmine.createSpy 1`] = ` -"expect(spy).toHaveBeenCalled() +"expect(spy).toHaveBeenCalled() Expected spy to have been called." `; exports[`toHaveBeenCalled works with jasmine.createSpy 2`] = ` -"expect(spy).not.toHaveBeenCalled() +"expect(spy).not.toHaveBeenCalled() Expected spy not to be called but it was called with: - Array []" + Array []" `; exports[`toHaveBeenCalled works with jasmine.createSpy 3`] = ` -"expect(received)[.not].toHaveBeenCalled() +"expect(received)[.not].toHaveBeenCalled() Matcher does not accept any arguments. Got: - number: 555" + number: 555" `; exports[`toHaveBeenCalled works with jest.fn 1`] = ` -"expect(jest.fn()).toHaveBeenCalled() +"expect(jest.fn()).toHaveBeenCalled() 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: - Array []" + Array []" `; 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 []" + 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(spy).toHaveBeenCalledTimes(2) +"expect(spy).toHaveBeenCalledTimes(2) -Expected spy to have been called two times, but it was called one time." +Expected spy to have been called two times, but it was called one time." `; exports[`toHaveBeenCalledTimes fails if function called more than expected times 1`] = ` -"expect(spy).toHaveBeenCalledTimes(2) +"expect(spy).toHaveBeenCalledTimes(2) -Expected spy to have been called two times, but it was called three times." +Expected spy to have been called two times, but it was called three times." `; exports[`toHaveBeenCalledTimes passes if function called equal to expected times 1`] = ` -"expect(spy).not.toHaveBeenCalledTimes(2) +"expect(spy).not.toHaveBeenCalledTimes(2) -Expected spy not to be called two times, but it was called exactly two times." +Expected spy 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. +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. +jest.fn() value must be a mock function or spy. Received: - function: [Function fn]" + function: [Function fn]" `; exports[`toHaveBeenCalledWith works with jasmine.createSpy and arguments that don't match 1`] = ` -"expect(spy).toHaveBeenCalledWith(expected) +"expect(spy).toHaveBeenCalledWith(expected) Expected spy to have been called with: - [\\"foo\\", \\"bar\\"] + [\\"foo\\", \\"bar\\"] But it was called with: - [\\"foo\\", \\"bar1\\"]" + [\\"foo\\", \\"bar1\\"]" `; exports[`toHaveBeenCalledWith works with jasmine.createSpy and arguments that match 1`] = ` -"expect(spy).not.toHaveBeenCalledWith(expected) +"expect(spy).not.toHaveBeenCalledWith(expected) Expected spy not to have been called with: - [\\"foo\\", \\"bar\\"]" + [\\"foo\\", \\"bar\\"]" `; exports[`toHaveBeenCalledWith works with jasmine.createSpy and many arguments 1`] = ` -"expect(spy).not.toHaveBeenCalledWith(expected) +"expect(spy).not.toHaveBeenCalledWith(expected) Expected spy not to have been called with: - [\\"foo\\", \\"bar\\"]" + [\\"foo\\", \\"bar\\"]" `; exports[`toHaveBeenCalledWith works with jasmine.createSpy and many arguments that don't match 1`] = ` -"expect(spy).toHaveBeenCalledWith(expected) +"expect(spy).toHaveBeenCalledWith(expected) Expected spy to have been called with: - [\\"foo\\", \\"bar\\"] + [\\"foo\\", \\"bar\\"] But it was called with: - [\\"foo\\", \\"bar3\\"], [\\"foo\\", \\"bar2\\"], [\\"foo\\", \\"bar1\\"]" + [\\"foo\\", \\"bar3\\"], [\\"foo\\", \\"bar2\\"], [\\"foo\\", \\"bar1\\"]" `; exports[`toHaveBeenCalledWith works with jasmine.createSpy when not called 1`] = ` -"expect(spy).toHaveBeenCalledWith(expected) +"expect(spy).toHaveBeenCalledWith(expected) Expected spy to have been called with: - [\\"foo\\", \\"bar\\"] -But it was not called." + [\\"foo\\", \\"bar\\"] +But it was not called." `; exports[`toHaveBeenCalledWith works with jest.fn and arguments that don't match 1`] = ` -"expect(jest.fn()).toHaveBeenCalledWith(expected) +"expect(jest.fn()).toHaveBeenCalledWith(expected) Expected mock function to have been called with: - [\\"foo\\", \\"bar\\"] + [\\"foo\\", \\"bar\\"] But it was called with: - [\\"foo\\", \\"bar1\\"]" + [\\"foo\\", \\"bar1\\"]" `; exports[`toHaveBeenCalledWith works with jest.fn and 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 jest.fn and 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 jest.fn and 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: - [\\"foo\\", \\"bar\\"] + [\\"foo\\", \\"bar\\"] But it was called with: - [\\"foo\\", \\"bar3\\"], [\\"foo\\", \\"bar2\\"], [\\"foo\\", \\"bar1\\"]" + [\\"foo\\", \\"bar3\\"], [\\"foo\\", \\"bar2\\"], [\\"foo\\", \\"bar1\\"]" `; exports[`toHaveBeenCalledWith works with jest.fn 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[`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. +jest.fn() value must be a mock function or spy. Received: - function: [Function fn]" + function: [Function fn]" `; exports[`toHaveBeenLastCalledWith works with jasmine.createSpy and arguments that don't match 1`] = ` -"expect(spy).toHaveBeenLastCalledWith(expected) +"expect(spy).toHaveBeenLastCalledWith(expected) Expected spy to have been last called with: - [\\"foo\\", \\"bar\\"] + [\\"foo\\", \\"bar\\"] But it was last called with: - [\\"foo\\", \\"bar1\\"]" + [\\"foo\\", \\"bar1\\"]" `; exports[`toHaveBeenLastCalledWith works with jasmine.createSpy and arguments that match 1`] = ` -"expect(spy).not.toHaveBeenLastCalledWith(expected) +"expect(spy).not.toHaveBeenLastCalledWith(expected) Expected spy to not have been last called with: - [\\"foo\\", \\"bar\\"]" + [\\"foo\\", \\"bar\\"]" `; exports[`toHaveBeenLastCalledWith works with jasmine.createSpy and many arguments 1`] = ` -"expect(spy).not.toHaveBeenLastCalledWith(expected) +"expect(spy).not.toHaveBeenLastCalledWith(expected) Expected spy to not have been last called with: - [\\"foo\\", \\"bar\\"]" + [\\"foo\\", \\"bar\\"]" `; exports[`toHaveBeenLastCalledWith works with jasmine.createSpy and many arguments that don't match 1`] = ` -"expect(spy).toHaveBeenLastCalledWith(expected) +"expect(spy).toHaveBeenLastCalledWith(expected) Expected spy to have been last called with: - [\\"foo\\", \\"bar\\"] + [\\"foo\\", \\"bar\\"] But it was last called with: - [\\"foo\\", \\"bar3\\"] -and two more calls." + [\\"foo\\", \\"bar3\\"] +and two more calls." `; exports[`toHaveBeenLastCalledWith works with jasmine.createSpy when not called 1`] = ` -"expect(spy).toHaveBeenLastCalledWith(expected) +"expect(spy).toHaveBeenLastCalledWith(expected) Expected spy to have been last called with: - [\\"foo\\", \\"bar\\"] -But it was not called." + [\\"foo\\", \\"bar\\"] +But it was not called." `; exports[`toHaveBeenLastCalledWith works with jest.fn and 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: - [\\"foo\\", \\"bar\\"] + [\\"foo\\", \\"bar\\"] But it was last called with: - [\\"foo\\", \\"bar1\\"]" + [\\"foo\\", \\"bar1\\"]" `; exports[`toHaveBeenLastCalledWith works with jest.fn and 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 jest.fn and 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 jest.fn and 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: - [\\"foo\\", \\"bar\\"] + [\\"foo\\", \\"bar\\"] But it was last called with: - [\\"foo\\", \\"bar3\\"] -and two more calls." + [\\"foo\\", \\"bar3\\"] +and two more calls." `; exports[`toHaveBeenLastCalledWith works with jest.fn 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." `; diff --git a/packages/jest-matchers/src/__tests__/__snapshots__/toThrowMatchers-test.js.snap b/packages/jest-matchers/src/__tests__/__snapshots__/toThrowMatchers-test.js.snap index 3983a568f6c8..cbd85675d904 100644 --- a/packages/jest-matchers/src/__tests__/__snapshots__/toThrowMatchers-test.js.snap +++ b/packages/jest-matchers/src/__tests__/__snapshots__/toThrowMatchers-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\\" + \\"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" `; 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/ + /apple/ 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/ + /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/ + /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\\" + \\"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\\" + \\"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" `; 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/ + /apple/ 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/ + /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/ + /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\\" + \\"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 4b52c8f96e50..38dd178ac343 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,11 +1,11 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`should exclude jasmine from stack trace for windows paths 1`] = ` -" ● windows test +" windows test at stack (..\\\\jest-jasmine2\\\\vendor\\\\jasmine-2.4.1.js:1580:17) - - at Object.addResult (..\\\\jest-jasmine2\\\\vendor\\\\jasmine-2.4.1.js:1550:14) - at Object.it (build\\\\__tests__\\\\messages-test.js:45:41) + + at Object.addResult (..\\\\jest-jasmine2\\\\vendor\\\\jasmine-2.4.1.js:1550:14) + at Object.it (build\\\\__tests__\\\\messages-test.js:45:41) " `; diff --git a/packages/jest-util/src/__tests__/__snapshots__/validateCLIOptions-test.js.snap b/packages/jest-util/src/__tests__/__snapshots__/validateCLIOptions-test.js.snap index fc92881b4bc8..330d911592c5 100644 --- a/packages/jest-util/src/__tests__/__snapshots__/validateCLIOptions-test.js.snap +++ b/packages/jest-util/src/__tests__/__snapshots__/validateCLIOptions-test.js.snap @@ -1,22 +1,22 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`fails for multiple unknown options 1`] = ` -"● Unrecognized CLI Parameters: +" Unrecognized CLI Parameters: Following options were not recognized: - [\\"jest\\", \\"test\\"] + [\\"jest\\", \\"test\\"] - CLI Options Documentation: + CLI Options Documentation: http://facebook.github.io/jest/docs/cli.html -" +" `; exports[`fails for unknown option 1`] = ` -"● Unrecognized CLI Parameter: +" Unrecognized CLI Parameter: - Unrecognized option \\"unknown\\". + Unrecognized option \\"unknown\\". - CLI Options Documentation: + 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 21bc4c709443..bbc81ae2e598 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: +" Deprecation Warning: - Option scriptPreprocessor was replaced by transform, which support multiple preprocessors. + Option scriptPreprocessor was replaced by transform, which support multiple preprocessors. Jest now treats your current configuration as: { - \\"transform\\": {\\".*\\": \\"test\\"} + \\"transform\\": {\\".*\\": \\"test\\"} } 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\\"? + 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: +" Validation Error: - Option \\"coverageReporters\\" must be of type: - array + Option \\"coverageReporters\\" must be of type: + array but instead received: - object + object Example: { - \\"coverageReporters\\": [\\"json\\", \\"text\\", \\"lcov\\", \\"clover\\"] + \\"coverageReporters\\": [\\"json\\", \\"text\\", \\"lcov\\", \\"clover\\"] } -" +" `; exports[`pretty prints valid config for Boolean 1`] = ` -"● Validation Error: +" Validation Error: - Option \\"automock\\" must be of type: - boolean + Option \\"automock\\" must be of type: + boolean but instead received: - array + array Example: { - \\"automock\\": false + \\"automock\\": false } -" +" `; exports[`pretty prints valid config for Function 1`] = ` -"● Validation Error: +" Validation Error: - Option \\"fn\\" must be of type: - function + Option \\"fn\\" must be of type: + function but instead received: - string + string Example: { - \\"fn\\": (config, option, deprecatedOptions) => true + \\"fn\\": (config, option, deprecatedOptions) => true } -" +" `; exports[`pretty prints valid config for Object 1`] = ` -"● Validation Error: +" Validation Error: - Option \\"haste\\" must be of type: - object + Option \\"haste\\" must be of type: + object but instead received: - number + number Example: { - \\"haste\\": {\\"providesModuleNodeModules\\": [\\"react\\", \\"react-native\\"]} + \\"haste\\": {\\"providesModuleNodeModules\\": [\\"react\\", \\"react-native\\"]} } -" +" `; exports[`pretty prints valid config for String 1`] = ` -"● Validation Error: +" Validation Error: - Option \\"preset\\" must be of type: - string + Option \\"preset\\" must be of type: + string but instead received: - number + number Example: { - \\"preset\\": \\"react-native\\" + \\"preset\\": \\"react-native\\" } -" +" `; exports[`works with custom deprecations 1`] = ` -"My Custom Deprecation Warning: +"My Custom Deprecation Warning: - Option scriptPreprocessor was replaced by transform, which support multiple preprocessors. + Option scriptPreprocessor was replaced by transform, which support multiple preprocessors. Jest now treats your current configuration as: { - \\"transform\\": {\\".*\\": \\"test\\"} + \\"transform\\": {\\".*\\": \\"test\\"} } Please update your configuration. -My custom comment" +My custom comment" `; exports[`works with custom errors 1`] = ` -"My Custom Error: +"My Custom Error: - Option \\"test\\" must be of type: - array + Option \\"test\\" must be of type: + array but instead received: - string + string Example: { - \\"test\\": [1, 2] + \\"test\\": [1, 2] } -My custom comment" +My custom comment" `; exports[`works with custom warnings 1`] = ` -"My Custom Warning: +"My Custom Warning: - Unknown option \\"unknown\\" with value \\"string\\" was found. + 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 comment" `; diff --git a/packages/pretty-format/src/__tests__/__snapshots__/pretty-format-test.js.snap b/packages/pretty-format/src/__tests__/__snapshots__/pretty-format-test.js.snap index c932066b843e..7eb2508229e5 100644 --- a/packages/pretty-format/src/__tests__/__snapshots__/pretty-format-test.js.snap +++ b/packages/pretty-format/src/__tests__/__snapshots__/pretty-format-test.js.snap @@ -1,43 +1,43 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`prettyFormat() ReactTestComponent and ReactElement plugins ReactElement plugin highlights syntax 1`] = ` -" - mouse -  - rat -  -  - } -/>" +" + prop={ + > + mouse + > + rat + + + } +/>" `; exports[`prettyFormat() ReactTestComponent and ReactElement plugins ReactElement plugin highlights syntax with color from theme option 1`] = ` -" - Hello, Mouse! -" +" + style=\\"color:red\\" +> + Hello, Mouse! +" `; exports[`prettyFormat() ReactTestComponent and ReactElement plugins ReactTestComponent plugin highlights syntax 1`] = ` -" - mouse -  - rat -  -  - } -/>" +" + prop={ + > + mouse + > + rat + + + } +/>" `; exports[`prettyFormat() ReactTestComponent and ReactElement plugins ReactTestComponent plugin highlights syntax with color from theme option 1`] = ` -" - Hello, Mouse! -" +" + style=\\"color:red\\" +> + Hello, Mouse! +" `; diff --git a/packages/pretty-format/src/plugins/ConvertAnsi.js b/packages/pretty-format/src/plugins/ConvertAnsi.js new file mode 100644 index 000000000000..ab7cc144e3f5 --- /dev/null +++ b/packages/pretty-format/src/plugins/ConvertAnsi.js @@ -0,0 +1,51 @@ +/** + * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @flow + */ + +'use strict'; + +import type {Colors, Indent, Options, Print, Plugin} from '../types.js'; + +const ansiRegex = require('ansi-regex'); + +const toHumanReadableAnsi = text => { + const style = require('ansi-styles'); + return text.replace(ansiRegex(), (match, offset, string) => { + switch (match) { + case style.red.close: + case style.green.close: + case style.reset.open: + case style.reset.close: + return ''; + case style.red.open: + return ''; + case style.green.open: + return ''; + case style.dim.open: + return ''; + case style.bold.open: + return ''; + default: + return ''; + } + }); +}; + +const test = (value: any) => + typeof value === 'string' && value.match(ansiRegex()); + +const print = ( + val: any, + print: Print, + indent: Indent, + opts: Options, + colors: Colors, +) => print(toHumanReadableAnsi(val)); + +module.exports = ({print, test}: Plugin);