From 6d4322e4d9f4c8f3430a7e44f6e0421ab0c8851f Mon Sep 17 00:00:00 2001 From: Yen-Chi Chen Date: Thu, 9 Apr 2020 23:07:55 +0200 Subject: [PATCH] update snapshots --- .../__snapshots__/beforeAllFiltered.ts.snap | 15 ++-- .../__snapshots__/beforeEachQueue.ts.snap | 15 ++-- .../__snapshots__/console.test.ts.snap | 71 +++++++++++++++---- .../consoleAfterTeardown.test.ts.snap | 2 +- ...consoleLogOutputWhenRunInBand.test.ts.snap | 3 +- .../declarationErrors.test.ts.snap | 2 + .../__snapshots__/jest.config.js.test.ts.snap | 3 +- e2e/__tests__/resolveBrowserField.test.ts | 3 +- 8 files changed, 88 insertions(+), 26 deletions(-) diff --git a/e2e/__tests__/__snapshots__/beforeAllFiltered.ts.snap b/e2e/__tests__/__snapshots__/beforeAllFiltered.ts.snap index 247de33015d5..192772e065ce 100644 --- a/e2e/__tests__/__snapshots__/beforeAllFiltered.ts.snap +++ b/e2e/__tests__/__snapshots__/beforeAllFiltered.ts.snap @@ -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) `; diff --git a/e2e/__tests__/__snapshots__/beforeEachQueue.ts.snap b/e2e/__tests__/__snapshots__/beforeEachQueue.ts.snap index a665905a9f06..05aa1771efc0 100644 --- a/e2e/__tests__/__snapshots__/beforeEachQueue.ts.snap +++ b/e2e/__tests__/__snapshots__/beforeEachQueue.ts.snap @@ -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) `; diff --git a/e2e/__tests__/__snapshots__/console.test.ts.snap b/e2e/__tests__/__snapshots__/console.test.ts.snap index 8077db761de9..9fb32fa24ff3 100644 --- a/e2e/__tests__/__snapshots__/console.test.ts.snap +++ b/e2e/__tests__/__snapshots__/console.test.ts.snap @@ -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`] = ` @@ -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`] = ` @@ -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`] = ` diff --git a/e2e/__tests__/__snapshots__/consoleAfterTeardown.test.ts.snap b/e2e/__tests__/__snapshots__/consoleAfterTeardown.test.ts.snap index 80308c7d489c..c75128492c2e 100644 --- a/e2e/__tests__/__snapshots__/consoleAfterTeardown.test.ts.snap +++ b/e2e/__tests__/__snapshots__/consoleAfterTeardown.test.ts.snap @@ -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) `; diff --git a/e2e/__tests__/__snapshots__/consoleLogOutputWhenRunInBand.test.ts.snap b/e2e/__tests__/__snapshots__/consoleLogOutputWhenRunInBand.test.ts.snap index fb009e134aed..c10c464477cf 100644 --- a/e2e/__tests__/__snapshots__/consoleLogOutputWhenRunInBand.test.ts.snap +++ b/e2e/__tests__/__snapshots__/consoleLogOutputWhenRunInBand.test.ts.snap @@ -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. (__tests__/a-banana.js:1:1) `; diff --git a/e2e/__tests__/__snapshots__/declarationErrors.test.ts.snap b/e2e/__tests__/__snapshots__/declarationErrors.test.ts.snap index ae697a3dfe6c..ba8fbe981588 100644 --- a/e2e/__tests__/__snapshots__/declarationErrors.test.ts.snap +++ b/e2e/__tests__/__snapshots__/declarationErrors.test.ts.snap @@ -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) " `; @@ -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) " `; diff --git a/e2e/__tests__/__snapshots__/jest.config.js.test.ts.snap b/e2e/__tests__/__snapshots__/jest.config.js.test.ts.snap index 498c5c97bfd8..e6574598170d 100644 --- a/e2e/__tests__/__snapshots__/jest.config.js.test.ts.snap +++ b/e2e/__tests__/__snapshots__/jest.config.js.test.ts.snap @@ -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 <>/jest.config.js/some/nested/directory + at Object.log (__tests__/a-banana.js:3:27) `; diff --git a/e2e/__tests__/resolveBrowserField.test.ts b/e2e/__tests__/resolveBrowserField.test.ts index f2e9383ed22c..2d7ffbf34b93 100644 --- a/e2e/__tests__/resolveBrowserField.test.ts +++ b/e2e/__tests__/resolveBrowserField.test.ts @@ -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. (packages/needs-preserved-id/index.js:1:13) `); expect(exitCode).toEqual(0); });