forked from jestjs/jest
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improves the terse messages in jest-editor (jestjs#3615)
* Improves the terse messages in jest-editor * Adds a note about wording for jest-editor inside a test that matches the error it is implicity relying on * Adds a note about wording for jest-editor inside a test that matches the error it is implicity relying on
- Loading branch information
Showing
7 changed files
with
71 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"numFailedTestSuites":1,"numFailedTests":7,"numPassedTestSuites":5,"numPassedTests":8,"numPendingTestSuites":0,"numPendingTests":0,"numRuntimeErrorTestSuites":0,"numTotalTestSuites":6,"numTotalTests":15,"snapshot":{"added":0,"didUpdate":false,"failure":true,"filesAdded":0,"filesRemoved":0,"filesUnmatched":1,"filesUpdated":0,"matched":5,"total":6,"unchecked":0,"unmatched":1,"updated":0},"startTime":1495204247174,"success":false,"testResults":[{"assertionResults":[{"failureMessages":["Error: expect(received).toEqual(expected)\n\nExpected value to equal:\n 2\nReceived:\n 1\n at Object.<anonymous>.it (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/src/_tests/example.test.ts:3:13)\n at Object.asyncFn (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/jest-jasmine2/build/jasmine-async.js:68:30)\n at resolve (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/jest-jasmine2/build/queueRunner.js:38:12)\n at tryCallTwo (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/promise/lib/core.js:45:5)\n at doResolve (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/promise/lib/core.js:200:13)\n at new Promise (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/promise/lib/core.js:66:3)\n at mapper (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/jest-jasmine2/build/queueRunner.js:31:21)\n at Promise.resolve.then.el (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/p-map/index.js:42:16)\n at tryCallOne (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/promise/lib/core.js:37:12)\n at /Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/promise/lib/core.js:123:15"],"status":"failed","title":"numbers"},{"failureMessages":["Error: expect(received).toEqual(expected)\n\nExpected value to equal:\n 2\nReceived:\n \"1\"\n\nDifference:\n\n Comparing two different types of values. Expected number but received string.\n at Object.<anonymous>.it (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/src/_tests/example.test.ts:7:15)\n at Object.asyncFn (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/jest-jasmine2/build/jasmine-async.js:68:30)\n at resolve (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/jest-jasmine2/build/queueRunner.js:38:12)\n at tryCallTwo (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/promise/lib/core.js:45:5)\n at doResolve (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/promise/lib/core.js:200:13)\n at new Promise (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/promise/lib/core.js:66:3)\n at mapper (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/jest-jasmine2/build/queueRunner.js:31:21)\n at Promise.resolve.then.el (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/p-map/index.js:42:16)\n at tryCallOne (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/promise/lib/core.js:37:12)\n at /Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/promise/lib/core.js:123:15"],"status":"failed","title":"string to numbers: numbers"},{"failureMessages":["Error: expect(received).toEqual(expected)\n\nExpected value to equal:\n {\"a\": 2}\nReceived:\n {}\n\nDifference:\n\n- Expected\n+ Received\n\n-Object {\n- \"a\": 2,\n-}\n+Object {}\n at Object.<anonymous>.it (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/src/_tests/example.test.ts:11:14)\n at Object.asyncFn (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/jest-jasmine2/build/jasmine-async.js:68:30)\n at resolve (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/jest-jasmine2/build/queueRunner.js:38:12)\n at tryCallTwo (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/promise/lib/core.js:45:5)\n at doResolve (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/promise/lib/core.js:200:13)\n at new Promise (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/promise/lib/core.js:66:3)\n at mapper (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/jest-jasmine2/build/queueRunner.js:31:21)\n at Promise.resolve.then.el (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/p-map/index.js:42:16)\n at tryCallOne (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/promise/lib/core.js:37:12)\n at /Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/promise/lib/core.js:123:15"],"status":"failed","title":"objects"},{"failureMessages":["Error: expect(value).toMatchSnapshot()\n\nReceived value does not match stored snapshot 1.\n\n- Snapshot\n+ Received\n\nObject {\n- \"asd\": 3,\n+ \"asd\": 2,\n }\n at Object.<anonymous>.it (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/src/_tests/example.test.ts:15:20)\n at Object.asyncFn (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/jest-jasmine2/build/jasmine-async.js:68:30)\n at resolve (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/jest-jasmine2/build/queueRunner.js:38:12)\n at tryCallTwo (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/promise/lib/core.js:45:5)\n at doResolve (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/promise/lib/core.js:200:13)\n at new Promise (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/promise/lib/core.js:66:3)\n at mapper (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/jest-jasmine2/build/queueRunner.js:31:21)\n at Promise.resolve.then.el (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/p-map/index.js:42:16)\n at tryCallOne (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/promise/lib/core.js:37:12)\n at /Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/promise/lib/core.js:123:15"],"status":"failed","title":"snapshots"},{"failureMessages":[],"status":"passed","title":"making snapshot"},{"failureMessages":["Error: expect(received).toBeGreaterThan(expected)\n\nExpected value to be greater than:\n 3\nReceived:\n 2\n at Object.<anonymous>.it (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/src/_tests/example.test.ts:23:13)\n at Object.asyncFn (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/jest-jasmine2/build/jasmine-async.js:68:30)\n at resolve (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/jest-jasmine2/build/queueRunner.js:38:12)\n at tryCallTwo (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/promise/lib/core.js:45:5)\n at doResolve (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/promise/lib/core.js:200:13)\n at new Promise (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/promise/lib/core.js:66:3)\n at mapper (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/jest-jasmine2/build/queueRunner.js:31:21)\n at Promise.resolve.then.el (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/p-map/index.js:42:16)\n at tryCallOne (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/promise/lib/core.js:37:12)\n at /Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/promise/lib/core.js:123:15"],"status":"failed","title":"greater than"},{"failureMessages":["Error: expect(received).toBeFalsy()\n\nExpected value to be falsy, instead received\n 2\n at Object.<anonymous>.it (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/src/_tests/example.test.ts:27:13)\n at Object.asyncFn (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/jest-jasmine2/build/jasmine-async.js:68:30)\n at resolve (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/jest-jasmine2/build/queueRunner.js:38:12)\n at tryCallTwo (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/promise/lib/core.js:45:5)\n at doResolve (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/promise/lib/core.js:200:13)\n at new Promise (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/promise/lib/core.js:66:3)\n at mapper (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/jest-jasmine2/build/queueRunner.js:31:21)\n at Promise.resolve.then.el (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/p-map/index.js:42:16)\n at tryCallOne (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/promise/lib/core.js:37:12)\n at /Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/promise/lib/core.js:123:15"],"status":"failed","title":"falsy"},{"failureMessages":["Error: expect(received).toBeTruthy()\n\nExpected value to be truthy, instead received\n null\n at Object.<anonymous>.it (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/src/_tests/example.test.ts:31:16)\n at Object.asyncFn (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/jest-jasmine2/build/jasmine-async.js:68:30)\n at resolve (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/jest-jasmine2/build/queueRunner.js:38:12)\n at tryCallTwo (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/promise/lib/core.js:45:5)\n at doResolve (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/promise/lib/core.js:200:13)\n at new Promise (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/promise/lib/core.js:66:3)\n at mapper (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/jest-jasmine2/build/queueRunner.js:31:21)\n at Promise.resolve.then.el (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/p-map/index.js:42:16)\n at tryCallOne (/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/promise/lib/core.js:37:12)\n at /Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/node_modules/promise/lib/core.js:123:15"],"status":"failed","title":"truthy"}],"endTime":1495204249679,"message":" ● numbers\n\n expect(received).toEqual(expected)\n \n Expected value to equal:\n 2\n Received:\n 1\n \n at Object.<anonymous>.it (src/_tests/example.test.ts:3:13)\n\n ● string to numbers: numbers\n\n expect(received).toEqual(expected)\n \n Expected value to equal:\n 2\n Received:\n \"1\"\n \n Difference:\n \n Comparing two different types of values. Expected number but received string.\n \n at Object.<anonymous>.it (src/_tests/example.test.ts:7:15)\n\n ● objects\n\n expect(received).toEqual(expected)\n \n Expected value to equal:\n {\"a\": 2}\n Received:\n {}\n \n Difference:\n \n - Expected\n + Received\n \n -Object {\n - \"a\": 2,\n -}\n +Object {}\n \n at Object.<anonymous>.it (src/_tests/example.test.ts:11:14)\n\n ● snapshots\n\n expect(value).toMatchSnapshot()\n \n Received value does not match stored snapshot 1.\n \n - Snapshot\n + Received\n \n Object {\n - \"asd\": 3,\n + \"asd\": 2,\n }\n \n at Object.<anonymous>.it (src/_tests/example.test.ts:15:20)\n\n ● greater than\n\n expect(received).toBeGreaterThan(expected)\n \n Expected value to be greater than:\n 3\n Received:\n 2\n \n at Object.<anonymous>.it (src/_tests/example.test.ts:23:13)\n\n ● falsy\n\n expect(received).toBeFalsy()\n \n Expected value to be falsy, instead received\n 2\n \n at Object.<anonymous>.it (src/_tests/example.test.ts:27:13)\n\n ● truthy\n\n expect(received).toBeTruthy()\n \n Expected value to be truthy, instead received\n null\n \n at Object.<anonymous>.it (src/_tests/example.test.ts:31:16)\n","name":"/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/src/_tests/example.test.ts","startTime":1495204247355,"status":"failed","summary":""},{"assertionResults":[{"failureMessages":[],"status":"passed","title":"handles some simple JSX"}],"endTime":1495204250922,"message":"","name":"/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/src/_tests/render.test.tsx","startTime":1495204249689,"status":"passed","summary":""},{"assertionResults":[{"failureMessages":[],"status":"passed","title":"generates the width for a simple component"}],"endTime":1495204251093,"message":"","name":"/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/src/_tests/_component-to-node.test.ts","startTime":1495204250950,"status":"passed","summary":""},{"assertionResults":[{"failureMessages":[],"status":"passed","title":"wraps whatever text you pass into it with an SVG schema"}],"endTime":1495204251200,"message":"","name":"/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/src/_tests/_tree-to-svg.test.ts","startTime":1495204251099,"status":"passed","summary":""},{"assertionResults":[{"failureMessages":[],"status":"passed","title":"wraps whatever text you pass into it with an SVG schema"},{"failureMessages":[],"status":"passed","title":"Calls nodeToSVG for it's first node"},{"failureMessages":[],"status":"passed","title":"Calls nodeToSVG for it's children nodes"}],"endTime":1495204251312,"message":"","name":"/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/src/_tests/_tree-to-svg-sub-funcs.test.ts","startTime":1495204251206,"status":"passed","summary":""},{"assertionResults":[{"failureMessages":[],"status":"passed","title":"handles a simple square"}],"endTime":1495204251434,"message":"","name":"/Users/orta/dev/projects/artsy/js/libs/jest-snapshots-svg/src/_tests/_node-to-svg.test.ts","startTime":1495204251318,"status":"passed","summary":""}],"wasInterrupted":false} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters