Skip to content

Commit eb27a11

Browse files
committed
Merge remote-tracking branch 'upstream/master' into 8784
* upstream/master: expect: Display equal values for ReturnedWith similar to CalledWith (jestjs#8791) Clearer messages for Node assert errors (jestjs#8792) use babel-plugin-replace-ts-export-assignment package (jestjs#8805) jest-matcher-utils: Add color options to matcherHint (jestjs#8795) chore: Make sure copyright header comment includes license (jestjs#8783)
2 parents fb96ea7 + 9a15d46 commit eb27a11

File tree

169 files changed

+1108
-401
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

169 files changed

+1108
-401
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
- `[expect]` Throw matcher error when received cannot be jasmine spy ([#8747](https://github.com/facebook/jest/pull/8747))
1212
- `[expect]` Improve report when negative CalledWith assertion fails ([#8755](https://github.com/facebook/jest/pull/8755))
1313
- `[expect]` Improve report when positive CalledWith assertion fails ([#8771](https://github.com/facebook/jest/pull/8771))
14+
- `[expect]` Display equal values for ReturnedWith similar to CalledWith ([#8791](https://github.com/facebook/jest/pull/8791))
1415
- `[jest-snapshot]` Highlight substring differences when matcher fails, part 3 ([#8569](https://github.com/facebook/jest/pull/8569))
1516
- `[jest-core]` Improve report when snapshots are obsolete ([#8448](https://github.com/facebook/jest/pull/8665))
1617
- `[jest-cli]` Improve chai support (with detailed output, to match jest exceptions) ([#8454](https://github.com/facebook/jest/pull/8454))
@@ -21,6 +22,8 @@
2122
- `[@jest/core, @jest/test-sequencer]` Support async sort in custom `testSequencer` ([#8642](https://github.com/facebook/jest/pull/8642))
2223
- `[jest-runtime, @jest/fake-timers]` Add `jest.advanceTimersToNextTimer` ([#8713](https://github.com/facebook/jest/pull/8713))
2324
- `[@jest-transform]` Extract transforming require logic within `jest-core` into `@jest-transform` ([#8756](https://github.com/facebook/jest/pull/8756))
25+
- `[jest-matcher-utils]` Add color options to `matcherHint` ([#8795](https://github.com/facebook/jest/pull/8795))
26+
- `[jest-circus/jest-jasmine2]` Give clearer output for Node assert errors ([#8792](https://github.com/facebook/jest/pull/8792))
2427

2528
### Fixes
2629

@@ -47,6 +50,7 @@
4750
- `[docs]` Updated imports of react-testing-library to @testing-library/react in website ([#8757](https://github.com/facebook/jest/pull/8757))
4851
- `[jest-core]` Add `getVersion` (moved from `jest-cli`) ([#8706](https://github.com/facebook/jest/pull/8706))
4952
- `[docs]` Fix MockFunctions example that was using toContain instead of toContainEqual ([#8765](https://github.com/facebook/jest/pull/8765))
53+
- `[*]` Make sure copyright header comment includes license ([#8783](https://github.com/facebook/jest/pull/8783))
5054
- `[docs]` Fix WatchPlugins `jestHooks.shouldRunTestSuite` example that receives an object ([#8784](https://github.com/facebook/jest/pull/8784))
5155

5256
### Performance

babel.config.js

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
1-
// Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
1+
/**
2+
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*/
27

38
module.exports = {
49
babelrcRoots: ['examples/*'],
510
overrides: [
611
{
712
plugins: [
813
'babel-plugin-typescript-strip-namespaces',
9-
require.resolve(
10-
'./scripts/babel-plugin-jest-replace-ts-export-assignment.js'
11-
),
14+
'babel-plugin-replace-ts-export-assignment',
1215
],
1316
presets: ['@babel/preset-typescript'],
1417
test: /\.tsx?$/,
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

33
exports[`Correct BeforeAll run ensures the BeforeAll of ignored suite is not run 1`] = `
4-
console.log __tests__/beforeAllFiltered.test.js:5
4+
console.log __tests__/beforeAllFiltered.test.js:10
55
beforeAll 1
66
7-
console.log __tests__/beforeAllFiltered.test.js:8
7+
console.log __tests__/beforeAllFiltered.test.js:13
88
beforeEach 1
99
10-
console.log __tests__/beforeAllFiltered.test.js:17
10+
console.log __tests__/beforeAllFiltered.test.js:22
1111
It Foo
1212
13-
console.log __tests__/beforeAllFiltered.test.js:11
13+
console.log __tests__/beforeAllFiltered.test.js:16
1414
afterEach 1
1515
16-
console.log __tests__/beforeAllFiltered.test.js:14
16+
console.log __tests__/beforeAllFiltered.test.js:19
1717
afterAll 1
1818
1919
`;
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

33
exports[`Correct beforeEach order ensures the correct order for beforeEach 1`] = `
4-
console.log __tests__/beforeEachQueue.test.js:5
4+
console.log __tests__/beforeEachQueue.test.js:10
55
BeforeEach
66
7-
console.log __tests__/beforeEachQueue.test.js:9
7+
console.log __tests__/beforeEachQueue.test.js:14
88
It Foo
99
10-
console.log __tests__/beforeEachQueue.test.js:12
10+
console.log __tests__/beforeEachQueue.test.js:17
1111
BeforeEach Inline Foo
1212
13-
console.log __tests__/beforeEachQueue.test.js:5
13+
console.log __tests__/beforeEachQueue.test.js:10
1414
BeforeEach
1515
16-
console.log __tests__/beforeEachQueue.test.js:17
16+
console.log __tests__/beforeEachQueue.test.js:22
1717
It Bar
1818
1919
`;

0 commit comments

Comments
 (0)