Skip to content

Commit

Permalink
update snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
ychi committed Apr 9, 2020
1 parent 3e9c172 commit 6d4322e
Show file tree
Hide file tree
Showing 8 changed files with 88 additions and 26 deletions.
15 changes: 10 additions & 5 deletions e2e/__tests__/__snapshots__/beforeAllFiltered.ts.snap
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Correct BeforeAll run ensures the BeforeAll of ignored suite is not run 1`] = `
console.log __tests__/beforeAllFiltered.test.js:10
console.log
beforeAll 1
at Object.log (__tests__/beforeAllFiltered.test.js:10:13)
console.log __tests__/beforeAllFiltered.test.js:13
console.log
beforeEach 1
at Object.log (__tests__/beforeAllFiltered.test.js:13:13)
console.log __tests__/beforeAllFiltered.test.js:22
console.log
It Foo
at Object.log (__tests__/beforeAllFiltered.test.js:22:13)
console.log __tests__/beforeAllFiltered.test.js:16
console.log
afterEach 1
at Object.log (__tests__/beforeAllFiltered.test.js:16:13)
console.log __tests__/beforeAllFiltered.test.js:19
console.log
afterAll 1
at Object.log (__tests__/beforeAllFiltered.test.js:19:13)
`;
15 changes: 10 additions & 5 deletions e2e/__tests__/__snapshots__/beforeEachQueue.ts.snap
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Correct beforeEach order ensures the correct order for beforeEach 1`] = `
console.log __tests__/beforeEachQueue.test.js:10
console.log
BeforeEach
at Object.log (__tests__/beforeEachQueue.test.js:10:13)
console.log __tests__/beforeEachQueue.test.js:14
console.log
It Foo
at Object.log (__tests__/beforeEachQueue.test.js:14:13)
console.log __tests__/beforeEachQueue.test.js:17
console.log
BeforeEach Inline Foo
at Object.log (__tests__/beforeEachQueue.test.js:17:15)
console.log __tests__/beforeEachQueue.test.js:10
console.log
BeforeEach
at Object.log (__tests__/beforeEachQueue.test.js:10:13)
console.log __tests__/beforeEachQueue.test.js:22
console.log
It Bar
at Object.log (__tests__/beforeEachQueue.test.js:22:13)
`;
71 changes: 59 additions & 12 deletions e2e/__tests__/__snapshots__/console.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,35 @@ exports[`console printing 1`] = `
PASS __tests__/console.test.js
● Console
console.log __tests__/console.test.js:10
console.log
This is a log message.
console.info __tests__/console.test.js:12
at Object.log (__tests__/console.test.js:10:11)
console.info
This is an info message.
console.warn __tests__/console.test.js:14
at Object.info (__tests__/console.test.js:12:11)
console.warn
This is a warning message.
console.error __tests__/console.test.js:16
12 | console.info('This is an info message.');
13 |
> 14 | console.warn('This is a warning message.');
| ^
15 |
16 | console.error('This is an error message.');
17 | });
at Object.warn (__tests__/console.test.js:14:11)
console.error
This is an error message.
14 | console.warn('This is a warning message.');
15 |
> 16 | console.error('This is an error message.');
| ^
17 | });
18 |
at Object.error (__tests__/console.test.js:16:11)
`;

exports[`console printing 2`] = `
Expand All @@ -23,18 +44,39 @@ Ran all test suites.
`;
exports[`console printing with --verbose 1`] = `
console.log __tests__/console.test.js:10
console.log
This is a log message.
at Object.log (__tests__/console.test.js:10:11)
console.info __tests__/console.test.js:12
console.info
This is an info message.
at Object.info (__tests__/console.test.js:12:11)
console.warn __tests__/console.test.js:14
console.warn
This is a warning message.
console.error __tests__/console.test.js:16
12 | console.info('This is an info message.');
13 |
> 14 | console.warn('This is a warning message.');
| ^
15 |
16 | console.error('This is an error message.');
17 | });
at Object.warn (__tests__/console.test.js:14:11)
console.error
This is an error message.
14 | console.warn('This is a warning message.');
15 |
> 16 | console.error('This is an error message.');
| ^
17 | });
18 |
at Object.error (__tests__/console.test.js:16:11)
`;
exports[`console printing with --verbose 2`] = `
Expand All @@ -56,17 +98,22 @@ exports[`does not error out when using winston 2`] = `
PASS __tests__/console.test.js
● Console
console.log node_modules/winston/lib/winston/transports/console.js:79
console.log
{"level":"info","message":"Log message from winston"}
console.log node_modules/winston/lib/winston/transports/console.js:79
at Console.log (node_modules/winston/lib/winston/transports/console.js:79:23)
console.log
{"message":"Info message from winston","level":"info"}
console.log node_modules/winston/lib/winston/transports/console.js:79
at Console.log (node_modules/winston/lib/winston/transports/console.js:79:23)
console.log
{"message":"Warn message from winston","level":"warn"}
console.log node_modules/winston/lib/winston/transports/console.js:79
at Console.log (node_modules/winston/lib/winston/transports/console.js:79:23)
console.log
{"message":"Error message from winston","level":"error"}
at Console.log (node_modules/winston/lib/winston/transports/console.js:79:23)
`;
exports[`does not error out when using winston 3`] = `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ PASS __tests__/console.test.js
14 | });
15 |
at BufferedConsole.log (../../packages/jest-console/build/BufferedConsole.js:199:10)
at BufferedConsole.log (../../packages/jest-console/build/BufferedConsole.js:201:10)
at log (__tests__/console.test.js:12:13)
`;
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ Ran all test suites.
`;
exports[`prints console.logs when run with forceExit 3`] = `
console.log __tests__/a-banana.js:1
console.log
Hey
at Object.<anonymous> (__tests__/a-banana.js:1:1)
`;
2 changes: 2 additions & 0 deletions e2e/__tests__/__snapshots__/declarationErrors.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ exports[`warns if describe returns a Promise 1`] = `
at Object.describe (__tests__/describeReturnPromise.test.js:11:1)
at addSpecsToSuite (../../packages/jest-jasmine2/build/jasmine/Env.js:450:21)
"
`;

Expand All @@ -37,5 +38,6 @@ exports[`warns if describe returns something 1`] = `
at Object.describe (__tests__/describeReturnSomething.test.js:11:1)
at addSpecsToSuite (../../packages/jest-jasmine2/build/jasmine/Env.js:468:21)
"
`;
3 changes: 2 additions & 1 deletion e2e/__tests__/__snapshots__/jest.config.js.test.ts.snap
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`traverses directory tree up until it finds jest.config 1`] = `
console.log ../../../__tests__/a-banana.js:3
console.log
<<REPLACED>>/jest.config.js/some/nested/directory
at Object.log (__tests__/a-banana.js:3:27)
`;
Expand Down
3 changes: 2 additions & 1 deletion e2e/__tests__/resolveBrowserField.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,9 @@ test('preserves module identity for symlinks when using browser field resolution
const {stdout, stderr, exitCode} = runJest(DIR, ['--no-watchman']);
expect(stderr).toContain('Test Suites: 1 passed, 1 total');
expect(wrap(stdout.trim())).toMatchInlineSnapshot(`
console.log packages/needs-preserved-id/index.js:1
console.log
needs-preserved-id executed
at Object.<anonymous> (packages/needs-preserved-id/index.js:1:13)
`);
expect(exitCode).toEqual(0);
});

0 comments on commit 6d4322e

Please sign in to comment.