Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into 8784
Browse files Browse the repository at this point in the history
* 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)
  • Loading branch information
jeysal committed Aug 11, 2019
2 parents fb96ea7 + 9a15d46 commit eb27a11
Show file tree
Hide file tree
Showing 169 changed files with 1,108 additions and 401 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- `[expect]` Throw matcher error when received cannot be jasmine spy ([#8747](https://github.com/facebook/jest/pull/8747))
- `[expect]` Improve report when negative CalledWith assertion fails ([#8755](https://github.com/facebook/jest/pull/8755))
- `[expect]` Improve report when positive CalledWith assertion fails ([#8771](https://github.com/facebook/jest/pull/8771))
- `[expect]` Display equal values for ReturnedWith similar to CalledWith ([#8791](https://github.com/facebook/jest/pull/8791))
- `[jest-snapshot]` Highlight substring differences when matcher fails, part 3 ([#8569](https://github.com/facebook/jest/pull/8569))
- `[jest-core]` Improve report when snapshots are obsolete ([#8448](https://github.com/facebook/jest/pull/8665))
- `[jest-cli]` Improve chai support (with detailed output, to match jest exceptions) ([#8454](https://github.com/facebook/jest/pull/8454))
Expand All @@ -21,6 +22,8 @@
- `[@jest/core, @jest/test-sequencer]` Support async sort in custom `testSequencer` ([#8642](https://github.com/facebook/jest/pull/8642))
- `[jest-runtime, @jest/fake-timers]` Add `jest.advanceTimersToNextTimer` ([#8713](https://github.com/facebook/jest/pull/8713))
- `[@jest-transform]` Extract transforming require logic within `jest-core` into `@jest-transform` ([#8756](https://github.com/facebook/jest/pull/8756))
- `[jest-matcher-utils]` Add color options to `matcherHint` ([#8795](https://github.com/facebook/jest/pull/8795))
- `[jest-circus/jest-jasmine2]` Give clearer output for Node assert errors ([#8792](https://github.com/facebook/jest/pull/8792))

### Fixes

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

### Performance
Expand Down
11 changes: 7 additions & 4 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
// Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
/**
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

module.exports = {
babelrcRoots: ['examples/*'],
overrides: [
{
plugins: [
'babel-plugin-typescript-strip-namespaces',
require.resolve(
'./scripts/babel-plugin-jest-replace-ts-export-assignment.js'
),
'babel-plugin-replace-ts-export-assignment',
],
presets: ['@babel/preset-typescript'],
test: /\.tsx?$/,
Expand Down
10 changes: 5 additions & 5 deletions e2e/__tests__/__snapshots__/beforeAllFiltered.ts.snap
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
// 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:5
console.log __tests__/beforeAllFiltered.test.js:10
beforeAll 1
console.log __tests__/beforeAllFiltered.test.js:8
console.log __tests__/beforeAllFiltered.test.js:13
beforeEach 1
console.log __tests__/beforeAllFiltered.test.js:17
console.log __tests__/beforeAllFiltered.test.js:22
It Foo
console.log __tests__/beforeAllFiltered.test.js:11
console.log __tests__/beforeAllFiltered.test.js:16
afterEach 1
console.log __tests__/beforeAllFiltered.test.js:14
console.log __tests__/beforeAllFiltered.test.js:19
afterAll 1
`;
10 changes: 5 additions & 5 deletions e2e/__tests__/__snapshots__/beforeEachQueue.ts.snap
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Correct beforeEach order ensures the correct order for beforeEach 1`] = `
console.log __tests__/beforeEachQueue.test.js:5
console.log __tests__/beforeEachQueue.test.js:10
BeforeEach
console.log __tests__/beforeEachQueue.test.js:9
console.log __tests__/beforeEachQueue.test.js:14
It Foo
console.log __tests__/beforeEachQueue.test.js:12
console.log __tests__/beforeEachQueue.test.js:17
BeforeEach Inline Foo
console.log __tests__/beforeEachQueue.test.js:5
console.log __tests__/beforeEachQueue.test.js:10
BeforeEach
console.log __tests__/beforeEachQueue.test.js:17
console.log __tests__/beforeEachQueue.test.js:22
It Bar
`;
Loading

0 comments on commit eb27a11

Please sign in to comment.