diff --git a/.github/SUPPORT.md b/.github/SUPPORT.md index 222c968691e0..6404a09955de 100644 --- a/.github/SUPPORT.md +++ b/.github/SUPPORT.md @@ -1,3 +1,3 @@ Please note this issue tracker is not a help forum. We recommend using [StackOverflow](https://stackoverflow.com/questions/tagged/jest) or our -[discord channel](http://facebook.github.io/jest/en/help.html) for questions. +[discord channel](https://discord.gg/MWRhKCj) for questions. diff --git a/CHANGELOG.md b/CHANGELOG.md index 62923e52b2f1..23742b4601ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,12 +2,15 @@ ### Fixes +* `[docs]` Update discord links ([#5586](https://github.com/facebook/jest/pull/5586)) * `[jest-runtime]` Align handling of testRegex on Windows between searching for tests and instrumentation checks ([#5560](https://github.com/facebook/jest/pull/5560)) ### Features -* `[docs]` Add MongoDB guide ([#5571](https://github.com/facebook/jest/pull/5571)) + +* `[docs]` Add MongoDB guide + ([#5571](https://github.com/facebook/jest/pull/5571)) * `[jest-runtime]` Deprecate mapCoverage option. ([#5177](https://github.com/facebook/jest/pull/5177)) * `[babel-jest]` Add option to return sourcemap from the transformer separately @@ -43,8 +46,8 @@ * `[jest-config]` Allow `` to be used with `collectCoverageFrom` ([#5524](https://github.com/facebook/jest/pull/5524)) -* `[filenames]` Standardize files names in "integration-tests" folder ([#5513](https://github.com/facebook/jest/pull/5513)) - +* `[filenames]` Standardize files names in "integration-tests" folder + ([#5513](https://github.com/facebook/jest/pull/5513)) ## jest 22.2.2 @@ -1603,4 +1606,4 @@ See https://facebook.github.io/jest/blog/2016/12/15/2016-in-jest.html ## <=0.4.0 -* See commit history for changes in previous versions of jest. \ No newline at end of file +* See commit history for changes in previous versions of jest. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ec5d6ad905ce..ee70a8512da6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -172,9 +172,8 @@ issues; go through the process outlined on that page. ## How to Get in Touch -* Discord - - [#jest](https://discordapp.com/channels/102860784329052160/103622435865104384) - on [Reactiflux](http://www.reactiflux.com/) +* Discord - [#jest](https://discord.gg/MWRhKCj) on + [Reactiflux](http://www.reactiflux.com/) ## Code Conventions diff --git a/README.md b/README.md index d5a087729b68..2c072102ef99 100644 --- a/README.md +++ b/README.md @@ -165,8 +165,8 @@ You are now set up to use all ES6 features and React specific syntax. Jest can be used in projects that use [webpack](https://webpack.js.org/) to manage assets, styles, and compilation. webpack does offer some unique -challenges over other tools. Refer to the [webpack guide](docs/Webpack.md) to get -started. +challenges over other tools. Refer to the [webpack guide](docs/Webpack.md) to +get started. ### Using TypeScript @@ -188,7 +188,8 @@ Learn more about using ## Badge Show the world you're using _Jest_ → -[![tested with jest](https://img.shields.io/badge/tested_with-jest-99424f.svg)](https://github.com/facebook/jest) [![jest](https://facebook.github.io/jest/img/jest-badge.svg)](https://github.com/facebook/jest) +[![tested with jest](https://img.shields.io/badge/tested_with-jest-99424f.svg)](https://github.com/facebook/jest) +[![jest](https://facebook.github.io/jest/img/jest-badge.svg)](https://github.com/facebook/jest) ```md [![tested with jest](https://img.shields.io/badge/tested_with-jest-99424f.svg)](https://github.com/facebook/jest) diff --git a/docs/Configuration.md b/docs/Configuration.md index 88a23ae1a1ad..4f27f9cc0bb1 100644 --- a/docs/Configuration.md +++ b/docs/Configuration.md @@ -410,7 +410,8 @@ Specifies notification mode. Requires `notify: true`. * `success`: send a notification when tests pass. * `change`: send a notification when the status changed. * `success-change`: send a notification when tests pass or once when it fails. -* `failure-success`: send a notification when tests fails or once when it passes. +* `failure-success`: send a notification when tests fails or once when it + passes. ### `preset` [string] diff --git a/docs/Es6ClassMocks.md b/docs/Es6ClassMocks.md index 8c3c62f3ba28..e9f8ae02ca5c 100644 --- a/docs/Es6ClassMocks.md +++ b/docs/Es6ClassMocks.md @@ -2,12 +2,20 @@ id: es6-class-mocks title: ES6 Class Mocks --- -Jest can be used to mock ES6 classes that are imported into files you want to test. -ES6 classes are constructor functions with some syntactic sugar. Therefore, any mock for an ES6 class must be a function or an actual ES6 class (which is, again, another function). So you can mock them using [mock functions](MockFunctions.md). +Jest can be used to mock ES6 classes that are imported into files you want to +test. + +ES6 classes are constructor functions with some syntactic sugar. Therefore, any +mock for an ES6 class must be a function or an actual ES6 class (which is, +again, another function). So you can mock them using +[mock functions](MockFunctions.md). ## An ES6 Class Example -We'll use a contrived example of a class that plays sound files, `SoundPlayer`, and a consumer class which uses that class, `SoundPlayerConsumer`. We'll mock `SoundPlayer` in our tests for `SoundPlayerConsumer`. + +We'll use a contrived example of a class that plays sound files, `SoundPlayer`, +and a consumer class which uses that class, `SoundPlayerConsumer`. We'll mock +`SoundPlayer` in our tests for `SoundPlayerConsumer`. ```javascript // sound-player.js @@ -41,9 +49,15 @@ export default class SoundPlayerConsumer { ## The 4 ways to create an ES6 class mock ### Automatic mock -Calling `jest.mock('./sound-player')` returns a useful "automatic mock" you can use to spy on calls to the class constructor and all of its methods. It replaces the ES6 class with a mock constructor, and replaces all of its methods with [mock functions](MockFunctions.md) that always return `undefined`. Method calls are saved in `theAutomaticMock.mock.instances[index].methodName.mock.calls`. -If you don't need to replace the implementation of the class, this is the easiest option to set up. For example: +Calling `jest.mock('./sound-player')` returns a useful "automatic mock" you can +use to spy on calls to the class constructor and all of its methods. It replaces +the ES6 class with a mock constructor, and replaces all of its methods with +[mock functions](MockFunctions.md) that always return `undefined`. Method calls +are saved in `theAutomaticMock.mock.instances[index].methodName.mock.calls`. + +If you don't need to replace the implementation of the class, this is the +easiest option to set up. For example: ```javascript import SoundPlayer from './sound-player'; @@ -60,7 +74,6 @@ it('We can check if the consumer called the class constructor', () => { expect(SoundPlayer).toHaveBeenCalledTimes(1); }); - it('We can check if the consumer called a method on the class instance', () => { // Show that mockClear() is working: expect(SoundPlayer).not.toHaveBeenCalled(); @@ -83,7 +96,10 @@ it('We can check if the consumer called a method on the class instance', () => { ``` ### Manual mock -Create a [manual mock](ManualMocks.md) by saving a mock implementation in the `__mocks__` folder. This allows you to specify the implementation, and it can be used across test files. + +Create a [manual mock](ManualMocks.md) by saving a mock implementation in the +`__mocks__` folder. This allows you to specify the implementation, and it can be +used across test files. ```javascript // __mocks__/sound-player.js @@ -91,16 +107,17 @@ Create a [manual mock](ManualMocks.md) by saving a mock implementation in the `_ // Import this named export into your test file: export const mockPlaySoundFile = jest.fn(); const mock = jest.fn().mockImplementation(() => { - return { playSoundFile: mockPlaySoundFile }; + return {playSoundFile: mockPlaySoundFile}; }); export default mock; ``` Import the mock and the mock method shared by all instances: + ```javascript // sound-player-consumer.test.js -import SoundPlayer, { mockPlaySoundFile } from './sound-player'; +import SoundPlayer, {mockPlaySoundFile} from './sound-player'; import SoundPlayerConsumer from './sound-player-consumer'; jest.mock('./sound-player'); // SoundPlayer is now a mock constructor @@ -115,7 +132,6 @@ it('We can check if the consumer called the class constructor', () => { expect(SoundPlayer).toHaveBeenCalledTimes(1); }); - it('We can check if the consumer called a method on the class instance', () => { const soundPlayerConsumer = new SoundPlayerConsumer(); const coolSoundFileName = 'song.mp3'; @@ -124,27 +140,41 @@ it('We can check if the consumer called a method on the class instance', () => { }); ``` -### Calling [`jest.mock()`](JestObjectAPI.md#jestmockmodulename-factory-options) with the module factory parameter -`jest.mock(path, moduleFactory)` takes a **module factory** argument. A module factory is a function that returns the mock. +### Calling [`jest.mock()`](JestObjectAPI.md#jestmockmodulename-factory-options) with the module factory parameter + +`jest.mock(path, moduleFactory)` takes a **module factory** argument. A module +factory is a function that returns the mock. -In order to mock a constructor function, the module factory must return a constructor function. In other words, the module factory must be a function that returns a function - a higher-order function (HOF). +In order to mock a constructor function, the module factory must return a +constructor function. In other words, the module factory must be a function that +returns a function - a higher-order function (HOF). ```javascript import SoundPlayer from './sound-player'; const mockPlaySoundFile = jest.fn(); jest.mock('./sound-player', () => { return jest.fn().mockImplementation(() => { - return { playSoundFile: mockPlaySoundFile }; + return {playSoundFile: mockPlaySoundFile}; }); }); ``` -A limitation with the factory parameter is that, since calls to `jest.mock()` are hoisted to the top of the file, it's not possible to first define a variable and then use it in the factory. An exception is made for variables that start with the word 'mock'. It's up to you to guarantee that they will be initialized on time! +A limitation with the factory parameter is that, since calls to `jest.mock()` +are hoisted to the top of the file, it's not possible to first define a variable +and then use it in the factory. An exception is made for variables that start +with the word 'mock'. It's up to you to guarantee that they will be initialized +on time! ### Replacing the mock using [`mockImplementation()`](MockFunctionAPI.md#mockfnmockimplementationfn) or [`mockImplementationOnce()`](MockFunctionAPI.md#mockfnmockimplementationoncefn) -You can replace all of the above mocks in order to change the implementation, for a single test or all tests, by calling `mockImplementation()` on the existing mock. -Calls to jest.mock are hoisted to the top of the code. You can specify a mock later, e.g. in `beforeAll()`, by calling `mockImplementation()` (or `mockImplementationOnce()`) on the existing mock instead of using the factory parameter. This also allows you to change the mock between tests, if needed: +You can replace all of the above mocks in order to change the implementation, +for a single test or all tests, by calling `mockImplementation()` on the +existing mock. + +Calls to jest.mock are hoisted to the top of the code. You can specify a mock +later, e.g. in `beforeAll()`, by calling `mockImplementation()` (or +`mockImplementationOnce()`) on the existing mock instead of using the factory +parameter. This also allows you to change the mock between tests, if needed: ```javascript import SoundPlayer from './sound-player'; @@ -153,7 +183,11 @@ jest.mock('./sound-player'); describe('When SoundPlayer throws an error', () => { beforeAll(() => { SoundPlayer.mockImplementation(() => { - return { playSoundFile: () => { throw new Error('Test error')} }; + return { + playSoundFile: () => { + throw new Error('Test error'); + }, + }; }); }); @@ -165,10 +199,17 @@ describe('When SoundPlayer throws an error', () => { ``` ## In depth: Understanding mock constructor functions -Building your constructor function mock using `jest.fn().mockImplementation()` makes mocks appear more complicated than they really are. This section shows how you can create your own simple mocks to illustrate how mocking works. + +Building your constructor function mock using `jest.fn().mockImplementation()` +makes mocks appear more complicated than they really are. This section shows how +you can create your own simple mocks to illustrate how mocking works. ### Manual mock that is another ES6 class -If you define an ES6 class using the same filename as the mocked class in the `__mocks__` folder, it will serve as the mock. This class will be used in place of the real class. This allows you to inject a test implementation for the class, but does not provide a way to spy on calls. + +If you define an ES6 class using the same filename as the mocked class in the +`__mocks__` folder, it will serve as the mock. This class will be used in place +of the real class. This allows you to inject a test implementation for the +class, but does not provide a way to spy on calls. For the contrived example, the mock might look like this: @@ -186,88 +227,120 @@ export default class SoundPlayer { ``` ### Simple mock using module factory parameter -The module factory function passed to `jest.mock(path, moduleFactory)` can be a HOF that returns a function*. This will allow calling `new` on the mock. Again, this allows you to inject different behavior for testing, but does not provide a way to spy on calls. -#### * Module factory function must return a function -In order to mock a constructor function, the module factory must return a constructor function. In other words, the module factory must be a function that returns a function - a higher-order function (HOF). +The module factory function passed to `jest.mock(path, moduleFactory)` can be a +HOF that returns a function\*. This will allow calling `new` on the mock. Again, +this allows you to inject different behavior for testing, but does not provide a +way to spy on calls. + +#### \* Module factory function must return a function + +In order to mock a constructor function, the module factory must return a +constructor function. In other words, the module factory must be a function that +returns a function - a higher-order function (HOF). ```javascript jest.mock('./sound-player', () => { return function() { - return { playSoundFile: () => {} }; + return {playSoundFile: () => {}}; }; }); ``` -***Note: Arrow functions won't work*** +**_Note: Arrow functions won't work_** -Note that the mock can't be an arrow function because calling `new` on an arrow function is not allowed in Javascript. So this won't work: +Note that the mock can't be an arrow function because calling `new` on an arrow +function is not allowed in Javascript. So this won't work: ```javascript jest.mock('./sound-player', () => { - return () => { // Does not work; arrow functions can't be called with new - return { playSoundFile: () => {} }; + return () => { + // Does not work; arrow functions can't be called with new + return {playSoundFile: () => {}}; }; }); ``` -This will throw ***TypeError: _soundPlayer2.default is not a constructor***, unless the code is transpiled to ES5, e.g. by babel-preset-env. (ES5 doesn't have arrow functions nor classes, so both will be transpiled to plain functions.) +This will throw **_TypeError: \_soundPlayer2.default is not a constructor_**, +unless the code is transpiled to ES5, e.g. by babel-preset-env. (ES5 doesn't +have arrow functions nor classes, so both will be transpiled to plain +functions.) ## Keeping track of usage (spying on the mock) -Injecting a test implementation is helpful, but you will probably also want to test whether the class constructor and methods are called with the correct parameters. + +Injecting a test implementation is helpful, but you will probably also want to +test whether the class constructor and methods are called with the correct +parameters. ### Spying on the constructor -In order to track calls to the constructor, replace the function returned by the HOF with a Jest mock function. Create it with [`jest.fn()`](JestObjectAPI.md#jestfnimplementation), and then specify its implementation with `mockImplementation()`. +In order to track calls to the constructor, replace the function returned by the +HOF with a Jest mock function. Create it with +[`jest.fn()`](JestObjectAPI.md#jestfnimplementation), and then specify its +implementation with `mockImplementation()`. ```javascript import SoundPlayer from './sound-player'; jest.mock('./sound-player', () => { - // Works and lets you check for constructor calls: + // Works and lets you check for constructor calls: return jest.fn().mockImplementation(() => { - return { playSoundFile: () => {} }; + return {playSoundFile: () => {}}; }); }); ``` -This will let us inspect usage of our mocked class, using `SoundPlayer.mock.calls`: -`expect(SoundPlayer).toHaveBeenCalled();` -or near-equivalent: -`expect(SoundPlayer.mock.calls.length).toEqual(1);` +This will let us inspect usage of our mocked class, using +`SoundPlayer.mock.calls`: `expect(SoundPlayer).toHaveBeenCalled();` or +near-equivalent: `expect(SoundPlayer.mock.calls.length).toEqual(1);` ### Spying on methods of our class -Our mocked class will need to provide any member functions (`playSoundFile` in the example) that will be called during our tests, or else we'll get an error for calling a function that doesn't exist. But we'll probably want to also spy on calls to those methods, to ensure that they were called with the expected parameters. -A new object will be created each time the mock constructor function is called during tests. To spy on method calls in all of these objects, we populate `playSoundFile` with another mock function, and store a reference to that same mock function in our test file, so it's available during tests. +Our mocked class will need to provide any member functions (`playSoundFile` in +the example) that will be called during our tests, or else we'll get an error +for calling a function that doesn't exist. But we'll probably want to also spy +on calls to those methods, to ensure that they were called with the expected +parameters. + +A new object will be created each time the mock constructor function is called +during tests. To spy on method calls in all of these objects, we populate +`playSoundFile` with another mock function, and store a reference to that same +mock function in our test file, so it's available during tests. ```javascript import SoundPlayer from './sound-player'; const mockPlaySoundFile = jest.fn(); jest.mock('./sound-player', () => { return jest.fn().mockImplementation(() => { - return { playSoundFile: mockPlaySoundFile }; - // Now we can track calls to playSoundFile + return {playSoundFile: mockPlaySoundFile}; + // Now we can track calls to playSoundFile }); }); ``` The manual mock equivalent of this would be: + ```javascript // __mocks__/sound-player.js // Import this named export into your test file export const mockPlaySoundFile = jest.fn(); const mock = jest.fn().mockImplementation(() => { - return { playSoundFile: mockPlaySoundFile } + return {playSoundFile: mockPlaySoundFile}; }); export default mock; ``` -Usage is similar to the module factory function, except that you can omit the second argument from `jest.mock()`, and you must import the mocked method into your test file, since it is no longer defined there. Use the original module path for this; don't include `__mocks__`. +Usage is similar to the module factory function, except that you can omit the +second argument from `jest.mock()`, and you must import the mocked method into +your test file, since it is no longer defined there. Use the original module +path for this; don't include `__mocks__`. ### Cleaning up between tests -To clear the record of calls to the mock constructor function and its methods, we call [`mockClear()`](MockFunctionAPI.md#mockfnmockclear) in the `beforeEach()` function: + +To clear the record of calls to the mock constructor function and its methods, +we call [`mockClear()`](MockFunctionAPI.md#mockfnmockclear) in the +`beforeEach()` function: ```javascript beforeEach(() => { @@ -277,7 +350,9 @@ beforeEach(() => { ``` ## Complete example -Here's a complete test file which uses the module factory parameter to `jest.mock`: + +Here's a complete test file which uses the module factory parameter to +`jest.mock`: ```javascript // sound-player-consumer.test.js @@ -287,7 +362,7 @@ import SoundPlayer from './sound-player'; const mockPlaySoundFile = jest.fn(); jest.mock('./sound-player', () => { return jest.fn().mockImplementation(() => { - return { playSoundFile: mockPlaySoundFile }; + return {playSoundFile: mockPlaySoundFile}; }); }); @@ -313,5 +388,4 @@ it('We can check if the consumer called a method on the class instance', () => { soundPlayerConsumer.playSomethingCool(); expect(mockPlaySoundFile.mock.calls[0][0]).toEqual(coolSoundFileName); }); - ``` diff --git a/docs/MongoDB.md b/docs/MongoDB.md index bba6a43b4039..e056b4991a1f 100644 --- a/docs/MongoDB.md +++ b/docs/MongoDB.md @@ -25,11 +25,11 @@ const MongodbMemoryServer = require('mongodb-memory-server'); const MONGO_DB_NAME = 'jest'; const mongod = new MongodbMemoryServer.default({ instance: { - dbName: MONGO_DB_NAME + dbName: MONGO_DB_NAME, }, binary: { - version: '3.2.19' - } + version: '3.2.19', + }, }); module.exports = function() { @@ -105,17 +105,20 @@ it('should aggregate docs from collection', async () => { {type: 'Image'}, {type: 'Document'}, {type: 'Image'}, - {type: 'Document'} + {type: 'Document'}, ]); const topFiles = await files - .aggregate([{$group: {_id: '$type', count: {$sum: 1}}}, {$sort: {count: -1}}]) + .aggregate([ + {$group: {_id: '$type', count: {$sum: 1}}}, + {$sort: {count: -1}}, + ]) .toArray(); expect(topFiles).toEqual([ {_id: 'Document', count: 3}, {_id: 'Image', count: 2}, - {_id: 'Video', count: 1} + {_id: 'Video', count: 1}, ]); }); ``` diff --git a/docs/MoreResources.md b/docs/MoreResources.md index 68a6feebede7..5bea494d3faf 100644 --- a/docs/MoreResources.md +++ b/docs/MoreResources.md @@ -32,9 +32,7 @@ projects. Ask questions and find answers from other Jest users like you. [Reactiflux](http://www.reactiflux.com/) is a Discord chat where a lot of Jest -discussion happens. Check out the -[#jest](https://discordapp.com/channels/102860784329052160/103622435865104384) -channel. +discussion happens. Check out the [#jest](https://discord.gg/MWRhKCj) channel. Follow the [Jest Twitter account](https://twitter.com/fbjest) and [blog](/jest/blog/) to find out what's happening in the world of Jest. diff --git a/docs/SnapshotTesting.md b/docs/SnapshotTesting.md index becaf27ebe59..1f01c626cc90 100644 --- a/docs/SnapshotTesting.md +++ b/docs/SnapshotTesting.md @@ -127,9 +127,9 @@ Failed snapshots can also be updated interactively in watch mode: ![](/jest/img/content/interactiveSnapshot.png) -Once you enter Interactive Snapshot Mode, Jest will step you through -the failed snapshots one test suite at a time and give you the opportunity to -review the failed output. +Once you enter Interactive Snapshot Mode, Jest will step you through the failed +snapshots one test suite at a time and give you the opportunity to review the +failed output. From here you can choose to update that snapshot or skip to the next: diff --git a/packages/jest-editor-support/README.md b/packages/jest-editor-support/README.md index 54fe396aa882..b8c6fbaebc31 100644 --- a/packages/jest-editor-support/README.md +++ b/packages/jest-editor-support/README.md @@ -8,7 +8,7 @@ This is only useful if you are interested in building an editor integration for Jest. For now as an end user, we'd recommend looking at either -[vscode-jest](https://github.com/jest-community/vscode-jest/) or +[vscode-jest](https://github.com/jest-community/vscode-jest/) or [majestic](https://github.com/Raathigesh/majestic/). ## Note diff --git a/website/blog/2017-05-06-jest-20-delightful-testing-multi-project-runner.md b/website/blog/2017-05-06-jest-20-delightful-testing-multi-project-runner.md index 6df451ab7812..256a58bf0889 100644 --- a/website/blog/2017-05-06-jest-20-delightful-testing-multi-project-runner.md +++ b/website/blog/2017-05-06-jest-20-delightful-testing-multi-project-runner.md @@ -179,4 +179,4 @@ community. We are incredibly grateful that we get the opportunity to work on improving JavaScript testing together. If you'd like to contribute to Jest, please don't hesitate to reach out to us on [GitHub](https://github.com/facebook/jest) or on -[Discord](https://discordapp.com/channels/102860784329052160/103622435865104384)._ +[Discord](https://discord.gg/MWRhKCj)._ diff --git a/website/core/Footer.js b/website/core/Footer.js index 0ede12e2bd72..711c8d597be7 100644 --- a/website/core/Footer.js +++ b/website/core/Footer.js @@ -69,9 +69,7 @@ class Footer extends React.Component { > Stack Overflow - - Jest Chat - + Jest Chat Twitter diff --git a/website/i18n/en.json b/website/i18n/en.json index 554df93c7ada..b11d7d41c4ea 100644 --- a/website/i18n/en.json +++ b/website/i18n/en.json @@ -16,6 +16,7 @@ "migration-guide": "Migrating to Jest", "mock-function-api": "Mock Functions", "mock-functions": "Mock Functions", + "mongodb": "Using with MongoDB", "more-resources": "More Resources", "puppeteer": "Using with puppeteer", "setup-teardown": "Setup and Teardown", @@ -43,7 +44,7 @@ "pages-strings": { "Find what you're looking for in our detailed documentation and guides.\\n\\n- Learn how to [get started](/jest/docs/en/getting-started.html) with Jest.\\n- [Troubleshoot](/jest/docs/en/troubleshooting.html) problems with Jest.\\n- Learn how to [configure Jest](/jest/docs/en/configuration.html).\\n- Look at the full [API Reference](/jest/docs/en/api.html).|no description given": "Find what you're looking for in our detailed documentation and guides.\\n\\n- Learn how to [get started](/jest/docs/en/getting-started.html) with Jest.\\n- [Troubleshoot](/jest/docs/en/troubleshooting.html) problems with Jest.\\n- Learn how to [configure Jest](/jest/docs/en/configuration.html).\\n- Look at the full [API Reference](/jest/docs/en/api.html).", "Browse the docs|no description given": "Browse the docs", - "Ask questions and find answers from other Jest users like you.\\n\\n- Join the [#jest](https://discordapp.com/channels/102860784329052160/103622435865104384) channel on [Reactiflux](http://www.reactiflux.com/), a Discord community.\\n- Many members of the community use Stack Overflow. Read through the [existing questions](https://stackoverflow.com/questions/tagged/jestjs) tagged with **jestjs** or [ask your own](https://stackoverflow.com/questions/ask)!|no description given": "Ask questions and find answers from other Jest users like you.\\n\\n- Join the [#jest](https://discordapp.com/channels/102860784329052160/103622435865104384) channel on [Reactiflux](http://www.reactiflux.com/), a Discord community.\\n- Many members of the community use Stack Overflow. Read through the [existing questions](https://stackoverflow.com/questions/tagged/jestjs) tagged with **jestjs** or [ask your own](https://stackoverflow.com/questions/ask)!", + "Ask questions and find answers from other Jest users like you.\\n\\n- Join the [#jest](https://discord.gg/MWRhKCj) channel on [Reactiflux](http://www.reactiflux.com/), a Discord community.\\n- Many members of the community use Stack Overflow. Read through the [existing questions](https://stackoverflow.com/questions/tagged/jestjs) tagged with **jestjs** or [ask your own](https://stackoverflow.com/questions/ask)!|no description given": "Ask questions and find answers from other Jest users like you.\\n\\n- Join the [#jest](https://discord.gg/MWRhKCj) channel on [Reactiflux](http://www.reactiflux.com/), a Discord community.\\n- Many members of the community use Stack Overflow. Read through the [existing questions](https://stackoverflow.com/questions/tagged/jestjs) tagged with **jestjs** or [ask your own](https://stackoverflow.com/questions/ask)!", "Join the community|no description given": "Join the community", "Find out what's new with Jest.\\n\\n- Follow [Jest](https://twitter.com/fbjest) on Twitter.\\n- Subscribe to the [Jest blog](/jest/blog/).\\n- Look at the [changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md).|no description given": "Find out what's new with Jest.\\n\\n- Follow [Jest](https://twitter.com/fbjest) on Twitter.\\n- Subscribe to the [Jest blog](/jest/blog/).\\n- Look at the [changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md).", "Stay up to date|no description given": "Stay up to date", diff --git a/website/pages/en/help.js b/website/pages/en/help.js index fe68835f9b3b..074f175a2337 100755 --- a/website/pages/en/help.js +++ b/website/pages/en/help.js @@ -34,11 +34,10 @@ class Help extends React.Component { content: ( Ask questions and find answers from other Jest users like you.\n\n- - Join the - [#jest](https://discordapp.com/channels/102860784329052160/103622435865104384) - channel on [Reactiflux](http://www.reactiflux.com/), a Discord - community.\n- Many members of the community use Stack Overflow. Read - through the [existing + Join the [#jest](https://discord.gg/MWRhKCj) channel on + [Reactiflux](http://www.reactiflux.com/), a Discord community.\n- + Many members of the community use Stack Overflow. Read through the + [existing questions](https://stackoverflow.com/questions/tagged/jestjs) tagged with **jestjs** or [ask your own](https://stackoverflow.com/questions/ask)!