Skip to content

Commit

Permalink
chore: Update @babel/* deps (#13422)
Browse files Browse the repository at this point in the history
  • Loading branch information
liuxingbaoyu committed Oct 11, 2022
1 parent c791d97 commit 7b67ecf
Show file tree
Hide file tree
Showing 21 changed files with 123 additions and 166 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -21,6 +21,8 @@

### Chore & Maintenance

- `[*]` Update `@babel/*` deps, resulting on slightly different atack traces for `each` ([#13422](https://github.com/facebook/jest/pull/13422))

### Performance

- `[jest-runner]` Do not instrument v8 coverage data if coverage should not be collected [#13282](https://github.com/facebook/jest/pull/13282)
Expand Down
Expand Up @@ -16,7 +16,7 @@ exports[`defining tests and hooks asynchronously throws 1`] = `
14 | });
15 | });
at eventHandler (../../packages/jest-circus/build/eventHandler.js:153:11)
at eventHandler (../../packages/jest-circus/build/eventHandler.js:134:11)
at test (__tests__/asyncDefinition.test.js:12:5)
● Test suite failed to run
Expand All @@ -31,7 +31,7 @@ exports[`defining tests and hooks asynchronously throws 1`] = `
15 | });
16 |
at eventHandler (../../packages/jest-circus/build/eventHandler.js:113:11)
at eventHandler (../../packages/jest-circus/build/eventHandler.js:97:11)
at afterAll (__tests__/asyncDefinition.test.js:13:5)
● Test suite failed to run
Expand All @@ -46,7 +46,7 @@ exports[`defining tests and hooks asynchronously throws 1`] = `
20 | });
21 |
at eventHandler (../../packages/jest-circus/build/eventHandler.js:153:11)
at eventHandler (../../packages/jest-circus/build/eventHandler.js:134:11)
at test (__tests__/asyncDefinition.test.js:18:3)
● Test suite failed to run
Expand All @@ -60,6 +60,6 @@ exports[`defining tests and hooks asynchronously throws 1`] = `
20 | });
21 |
at eventHandler (../../packages/jest-circus/build/eventHandler.js:113:11)
at eventHandler (../../packages/jest-circus/build/eventHandler.js:97:11)
at afterAll (__tests__/asyncDefinition.test.js:19:3)"
`;
Expand Up @@ -20,6 +20,6 @@ exports[`prints console.logs when run with forceExit 3`] = `
" console.log
Hey
at Object.<anonymous> (__tests__/a-banana.js:1:1)
at Object.<anonymous> (__tests__/a-banana.js:1:41)
"
`;
8 changes: 4 additions & 4 deletions e2e/__tests__/__snapshots__/each.test.ts.snap
Expand Up @@ -63,12 +63,12 @@ exports[`shows error message when not enough arguments are supplied to tests 1`]
6 | */
7 |
> 8 | it.each\`
| ^
| ^
9 | left | right
10 | \${true} | \${true}
11 | \${true}
at Object.<anonymous> (__tests__/eachException.test.js:8:1)
at Object.<anonymous> (__tests__/eachException.test.js:8:9)
● throws exception when not enough arguments are supplied $left == $right
Expand All @@ -86,12 +86,12 @@ exports[`shows error message when not enough arguments are supplied to tests 1`]
17 | );
18 |
> 19 | it.each\`
| ^
| ^
20 | left | right | up | down
21 | \${true} | \${true}
22 | \`(
at Object.<anonymous> (__tests__/eachException.test.js:19:1)"
at Object.<anonymous> (__tests__/eachException.test.js:19:9)"
`;
exports[`shows only the tests with .only as being ran 1`] = `
Expand Down
4 changes: 2 additions & 2 deletions e2e/__tests__/__snapshots__/errorOnDeprecated.test.ts.snap
Expand Up @@ -11,12 +11,12 @@ exports[`defaultTimeoutInterval.test.js errors in errorOnDeprecated mode 1`] = `
8 |
9 | test('Default Timeout Interval', () => {
> 10 | jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000;
| ^
| ^
11 | expect(true).toBe(true);
12 | });
13 |
at Object.<anonymous> (__tests__/defaultTimeoutInterval.test.js:10:3)"
at Object.<anonymous> (__tests__/defaultTimeoutInterval.test.js:10:35)"
`;
exports[`fail.test.js errors in errorOnDeprecated mode 1`] = `
Expand Down
4 changes: 2 additions & 2 deletions e2e/__tests__/__snapshots__/moduleNameMapper.test.ts.snap
Expand Up @@ -41,7 +41,7 @@ exports[`moduleNameMapper wrong array configuration 1`] = `
12 | module.exports = () => 'test';
13 |
at createNoMappedModuleFoundError (../../packages/jest-resolve/build/resolver.js:891:17)
at createNoMappedModuleFoundError (../../packages/jest-resolve/build/resolver.js:752:17)
at Object.require (index.js:10:1)
at Object.require (__tests__/index.js:10:20)"
`;
Expand Down Expand Up @@ -71,7 +71,7 @@ exports[`moduleNameMapper wrong configuration 1`] = `
12 | module.exports = () => 'test';
13 |
at createNoMappedModuleFoundError (../../packages/jest-resolve/build/resolver.js:891:17)
at createNoMappedModuleFoundError (../../packages/jest-resolve/build/resolver.js:752:17)
at Object.require (index.js:10:1)
at Object.require (__tests__/index.js:10:20)"
`;
2 changes: 1 addition & 1 deletion e2e/__tests__/__snapshots__/requireMissingExt.test.ts.snap
Expand Up @@ -26,7 +26,7 @@ exports[`shows a proper error from deep requires 1`] = `
12 | test('dummy', () => {
13 | expect(1).toBe(1);
at Resolver._throwModNotFoundError (../../packages/jest-resolve/build/resolver.js:487:11)
at Resolver._throwModNotFoundError (../../packages/jest-resolve/build/resolver.js:425:11)
at Object.<anonymous> (node_modules/discord.js/src/index.js:21:12)
at Object.require (__tests__/test.js:10:1)"
`;
Expand Up @@ -37,7 +37,7 @@ exports[`show error message with matching files 1`] = `
| ^
9 |
at Resolver._throwModNotFoundError (../../packages/jest-resolve/build/resolver.js:487:11)
at Resolver._throwModNotFoundError (../../packages/jest-resolve/build/resolver.js:425:11)
at Object.require (index.js:8:18)
at Object.require (__tests__/test.js:8:11)"
`;
72 changes: 24 additions & 48 deletions e2e/__tests__/__snapshots__/testFailing.test.ts.snap
Expand Up @@ -41,14 +41,12 @@ exports[`works with all statuses 1`] = `
28 | });
29 |
> 30 | test.failing.each([
| ^
| ^
31 | {a: 1, b: 1, expected: 2},
32 | {a: 1, b: 2, expected: 3},
33 | {a: 2, b: 1, expected: 3},
at ../../packages/jest-each/build/bind.js:45:11
at Array.forEach (<anonymous>)
at Object.<anonymous> (__tests__/statuses.test.js:30:1)
at Object.each (__tests__/statuses.test.js:30:14)
● .add(1, 2)
Expand All @@ -57,14 +55,12 @@ exports[`works with all statuses 1`] = `
28 | });
29 |
> 30 | test.failing.each([
| ^
| ^
31 | {a: 1, b: 1, expected: 2},
32 | {a: 1, b: 2, expected: 3},
33 | {a: 2, b: 1, expected: 3},
at ../../packages/jest-each/build/bind.js:45:11
at Array.forEach (<anonymous>)
at Object.<anonymous> (__tests__/statuses.test.js:30:1)
at Object.each (__tests__/statuses.test.js:30:14)
● .add(2, 1)
Expand All @@ -73,14 +69,12 @@ exports[`works with all statuses 1`] = `
28 | });
29 |
> 30 | test.failing.each([
| ^
| ^
31 | {a: 1, b: 1, expected: 2},
32 | {a: 1, b: 2, expected: 3},
33 | {a: 2, b: 1, expected: 3},
at ../../packages/jest-each/build/bind.js:45:11
at Array.forEach (<anonymous>)
at Object.<anonymous> (__tests__/statuses.test.js:30:1)
at Object.each (__tests__/statuses.test.js:30:14)
● failing passes = fails
Expand Down Expand Up @@ -130,14 +124,12 @@ exports[`works with concurrent and only mode 1`] = `
15 | });
16 |
> 17 | test.concurrent.only.failing.each([
| ^
| ^
18 | {a: 1, b: 1, expected: 2},
19 | {a: 1, b: 2, expected: 3},
20 | {a: 2, b: 1, expected: 3},
at ../../packages/jest-each/build/bind.js:45:11
at Array.forEach (<anonymous>)
at __tests__/worksWithConcurrentOnlyMode.test.js:17:3
at each (__tests__/worksWithConcurrentOnlyMode.test.js:17:32)
at Object.describe (__tests__/worksWithConcurrentOnlyMode.test.js:8:1)
● block with concurrent › .add(1, 2)
Expand All @@ -147,14 +139,12 @@ exports[`works with concurrent and only mode 1`] = `
15 | });
16 |
> 17 | test.concurrent.only.failing.each([
| ^
| ^
18 | {a: 1, b: 1, expected: 2},
19 | {a: 1, b: 2, expected: 3},
20 | {a: 2, b: 1, expected: 3},
at ../../packages/jest-each/build/bind.js:45:11
at Array.forEach (<anonymous>)
at __tests__/worksWithConcurrentOnlyMode.test.js:17:3
at each (__tests__/worksWithConcurrentOnlyMode.test.js:17:32)
at Object.describe (__tests__/worksWithConcurrentOnlyMode.test.js:8:1)
● block with concurrent › .add(2, 1)
Expand All @@ -164,14 +154,12 @@ exports[`works with concurrent and only mode 1`] = `
15 | });
16 |
> 17 | test.concurrent.only.failing.each([
| ^
| ^
18 | {a: 1, b: 1, expected: 2},
19 | {a: 1, b: 2, expected: 3},
20 | {a: 2, b: 1, expected: 3},
at ../../packages/jest-each/build/bind.js:45:11
at Array.forEach (<anonymous>)
at __tests__/worksWithConcurrentOnlyMode.test.js:17:3
at each (__tests__/worksWithConcurrentOnlyMode.test.js:17:32)
at Object.describe (__tests__/worksWithConcurrentOnlyMode.test.js:8:1)"
`;
Expand Down Expand Up @@ -225,14 +213,12 @@ exports[`works with concurrent mode 1`] = `
15 | });
16 |
> 17 | test.concurrent.failing.each([
| ^
| ^
18 | {a: 1, b: 1, expected: 2},
19 | {a: 1, b: 2, expected: 3},
20 | {a: 2, b: 1, expected: 3},
at ../../packages/jest-each/build/bind.js:45:11
at Array.forEach (<anonymous>)
at __tests__/worksWithConcurrentMode.test.js:17:3
at each (__tests__/worksWithConcurrentMode.test.js:17:27)
at Object.describe (__tests__/worksWithConcurrentMode.test.js:8:1)
● block with concurrent › .add(1, 2)
Expand All @@ -242,14 +228,12 @@ exports[`works with concurrent mode 1`] = `
15 | });
16 |
> 17 | test.concurrent.failing.each([
| ^
| ^
18 | {a: 1, b: 1, expected: 2},
19 | {a: 1, b: 2, expected: 3},
20 | {a: 2, b: 1, expected: 3},
at ../../packages/jest-each/build/bind.js:45:11
at Array.forEach (<anonymous>)
at __tests__/worksWithConcurrentMode.test.js:17:3
at each (__tests__/worksWithConcurrentMode.test.js:17:27)
at Object.describe (__tests__/worksWithConcurrentMode.test.js:8:1)
● block with concurrent › .add(2, 1)
Expand All @@ -259,14 +243,12 @@ exports[`works with concurrent mode 1`] = `
15 | });
16 |
> 17 | test.concurrent.failing.each([
| ^
| ^
18 | {a: 1, b: 1, expected: 2},
19 | {a: 1, b: 2, expected: 3},
20 | {a: 2, b: 1, expected: 3},
at ../../packages/jest-each/build/bind.js:45:11
at Array.forEach (<anonymous>)
at __tests__/worksWithConcurrentMode.test.js:17:3
at each (__tests__/worksWithConcurrentMode.test.js:17:27)
at Object.describe (__tests__/worksWithConcurrentMode.test.js:8:1)"
`;
Expand Down Expand Up @@ -300,14 +282,12 @@ exports[`works with only mode 1`] = `
13 | });
14 |
> 15 | it.only.failing.each([
| ^
| ^
16 | {a: 1, b: 1, expected: 2},
17 | {a: 1, b: 2, expected: 3},
18 | {a: 2, b: 1, expected: 3},
at ../../packages/jest-each/build/bind.js:45:11
at Array.forEach (<anonymous>)
at __tests__/worksWithOnlyMode.test.js:15:3
at each (__tests__/worksWithOnlyMode.test.js:15:19)
at Object.describe (__tests__/worksWithOnlyMode.test.js:10:1)
● block with only, should pass › .add(1, 2)
Expand All @@ -317,14 +297,12 @@ exports[`works with only mode 1`] = `
13 | });
14 |
> 15 | it.only.failing.each([
| ^
| ^
16 | {a: 1, b: 1, expected: 2},
17 | {a: 1, b: 2, expected: 3},
18 | {a: 2, b: 1, expected: 3},
at ../../packages/jest-each/build/bind.js:45:11
at Array.forEach (<anonymous>)
at __tests__/worksWithOnlyMode.test.js:15:3
at each (__tests__/worksWithOnlyMode.test.js:15:19)
at Object.describe (__tests__/worksWithOnlyMode.test.js:10:1)
● block with only, should pass › .add(2, 1)
Expand All @@ -334,14 +312,12 @@ exports[`works with only mode 1`] = `
13 | });
14 |
> 15 | it.only.failing.each([
| ^
| ^
16 | {a: 1, b: 1, expected: 2},
17 | {a: 1, b: 2, expected: 3},
18 | {a: 2, b: 1, expected: 3},
at ../../packages/jest-each/build/bind.js:45:11
at Array.forEach (<anonymous>)
at __tests__/worksWithOnlyMode.test.js:15:3
at each (__tests__/worksWithOnlyMode.test.js:15:19)
at Object.describe (__tests__/worksWithOnlyMode.test.js:10:1)
● block with only, should fail › failing passes = fails, should fail
Expand Down
4 changes: 2 additions & 2 deletions e2e/__tests__/__snapshots__/testFailingJasmine.test.ts.snap
Expand Up @@ -46,7 +46,7 @@ FAIL __tests__/worksWithConcurrentMode.test.js
15 | });
16 |
at Function.failing (../../packages/jest-jasmine2/build/jasmineAsyncInstall.js:195:11)
at Function.failing (../../packages/jest-jasmine2/build/jasmineAsyncInstall.js:164:11)
at Suite.failing (__tests__/worksWithConcurrentMode.test.js:13:17)
at Object.describe (__tests__/worksWithConcurrentMode.test.js:8:1)
Expand Down Expand Up @@ -80,7 +80,7 @@ FAIL __tests__/worksWithConcurrentOnlyMode.test.js
15 | });
16 |
at Function.failing (../../packages/jest-jasmine2/build/jasmineAsyncInstall.js:195:11)
at Function.failing (../../packages/jest-jasmine2/build/jasmineAsyncInstall.js:164:11)
at Suite.failing (__tests__/worksWithConcurrentOnlyMode.test.js:13:22)
at Object.describe (__tests__/worksWithConcurrentOnlyMode.test.js:8:1)
Expand Down
2 changes: 1 addition & 1 deletion e2e/__tests__/__snapshots__/transform.test.ts.snap
Expand Up @@ -6,7 +6,7 @@ exports[`babel-jest ignored tells user to match ignored files 1`] = `
babel-jest: Babel ignores __tests__/ignoredFile.test.js - make sure to include the file in Jest's transformIgnorePatterns as well.
at assertLoadedBabelConfig (../../../packages/babel-jest/build/index.js:130:11)"
at assertLoadedBabelConfig (../../../packages/babel-jest/build/index.js:105:11)"
`;

exports[`babel-jest instruments only specific files and collects coverage 1`] = `
Expand Down
8 changes: 4 additions & 4 deletions e2e/__tests__/locationInResults.test.ts
Expand Up @@ -45,12 +45,12 @@ it('adds correct location info when provided with flag', () => {
});

expect(assertions[3].location).toEqual({
column: isJestJasmineRun() ? 22 : 1,
column: 22,
line: 23,
});

expect(assertions[4].location).toEqual({
column: isJestJasmineRun() ? 22 : 1,
column: 22,
line: 23,
});

Expand All @@ -72,12 +72,12 @@ it('adds correct location info when provided with flag', () => {
});

expect(assertions[8].location).toEqual({
column: isJestJasmineRun() ? 24 : 3,
column: 24,
line: 41,
});

expect(assertions[9].location).toEqual({
column: isJestJasmineRun() ? 24 : 3,
column: 24,
line: 41,
});
});

0 comments on commit 7b67ecf

Please sign in to comment.