Skip to content

Commit d6e5ddb

Browse files
authored
Rename all links to main (#11856)
1 parent 3b7536f commit d6e5ddb

File tree

91 files changed

+204
-204
lines changed

Some content is hidden

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

91 files changed

+204
-204
lines changed

CHANGELOG.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## master
1+
## main
22

33
### Features
44

@@ -2138,7 +2138,7 @@ We skipped 24.2.0 because a draft was accidentally published. Please use `24.3.0
21382138
- Fix inconsistent name of complex values in pretty-format ([#4001](https://github.com/facebook/jest/pull/4001))
21392139
- Fix issue mocking bound method ([#3805](https://github.com/facebook/jest/pull/3805))
21402140
- Fix jest-circus ([#4290](https://github.com/facebook/jest/pull/4290))
2141-
- Fix lint warning in master
2141+
- Fix lint warning in main
21422142

21432143
([#4132](https://github.com/facebook/jest/pull/4132))
21442144

@@ -2240,7 +2240,7 @@ We skipped 24.2.0 because a draft was accidentally published. Please use `24.3.0
22402240
- Support maxDepth option in React plugins ([#4208](https://github.com/facebook/jest/pull/4208))
22412241
- Support SVG elements in HTMLElement plugin ([#4335](https://github.com/facebook/jest/pull/4335))
22422242
- Test empty Immutable collections with {min: false} option ([#4121](https://github.com/facebook/jest/pull/4121))
2243-
- test to debug travis failure in master ([#4145](https://github.com/facebook/jest/pull/4145))
2243+
- test to debug travis failure in main ([#4145](https://github.com/facebook/jest/pull/4145))
22442244
- testPathPattern message test ([#4006](https://github.com/facebook/jest/pull/4006))
22452245
- Throw Error When Using Nested It Specs ([#4039](https://github.com/facebook/jest/pull/4039))
22462246
- Throw when moduleNameMapper points to inexistent module ([#3567](https://github.com/facebook/jest/pull/3567))
@@ -2430,7 +2430,7 @@ See https://jestjs.io/blog/2016/12/15/2016-in-jest
24302430
- Renamed `--jsonOutputFile` to `--outputFile`.
24312431
- Added `jest-editor-support` for vscode and Nuclide integration.
24322432
- Fixed `test.concurrent` unhandled promise rejections.
2433-
- The Jest website is now auto-deployed when merging into master.
2433+
- The Jest website is now auto-deployed when merging into main.
24342434
- Updated `testRegex` to include `test.js` and `spec.js` files.
24352435
- Fixes for `babel-plugin-jest-hoist` when using `jest.mock` with three arguments.
24362436
- The `JSON` global in `jest-environment-node` now comes from the vm context instead of the parent context.
@@ -2751,7 +2751,7 @@ See https://jestjs.io/blog/2016/12/15/2016-in-jest
27512751
- Fixed a memory leak with test contexts. Jest now properly cleans up test environments after each test. Added `--logHeapUsage` to log memory usage after each test. Note: this is option is meant for debugging memory leaks and might significantly slow down your test run.
27522752
- Removed `mock-modules`, `node-haste` and `mocks` virtual modules. This is a breaking change of undocumented public API. Usage of this API can safely be automatically updated through an automated codemod:
27532753
- Example: http://astexplorer.net/#/zrybZ6UvRA
2754-
- Codemod: https://github.com/cpojer/js-codemod/blob/master/transforms/jest-update.js
2754+
- Codemod: https://github.com/cpojer/js-codemod/blob/main/transforms/jest-update.js
27552755
- jscodeshift: https://github.com/facebook/jscodeshift
27562756
- Removed `navigator.onLine` and `mockSetReadOnlyProperty` from the global jsdom environment. Use `window.navigator.onLine = true;` in your test setup and `Object.defineProperty` instead.
27572757

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ Facebook has adopted a Code of Conduct that we expect project participants to ad
1010

1111
All work on Jest happens directly on [GitHub](/). Both core team members and external contributors send pull requests which go through the same review process.
1212

13-
### `master` is unsafe
13+
### `main` is unsafe
1414

15-
We will do our best to keep `master` in good shape, with tests passing at all times. But in order to move fast, we will make API changes that your application might not be compatible with. We will do our best to communicate these changes and always version appropriately so you can lock into a specific version if need be.
15+
We will do our best to keep `main` in good shape, with tests passing at all times. But in order to move fast, we will make API changes that your application might not be compatible with. We will do our best to communicate these changes and always version appropriately so you can lock into a specific version if need be.
1616

1717
### Workflow and Pull Requests
1818

1919
The core team will be monitoring for pull requests. When we get one, we'll run some Facebook-specific integration tests on it first. From here, we'll need to get another person to sign off on the changes and then merge the pull request. For API changes we may need to fix internal uses, which could cause some delay. We'll do our best to provide updates and feedback throughout the process.
2020

2121
_Before_ submitting a pull request, please make sure the following is done…
2222

23-
1. Fork the repo and create your branch from `master`. A guide on how to fork a repository: https://help.github.com/articles/fork-a-repo/
23+
1. Fork the repo and create your branch from `main`. A guide on how to fork a repository: https://help.github.com/articles/fork-a-repo/
2424

2525
Open terminal (e.g. Terminal, iTerm, Git Bash or Git Shell) and type:
2626

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<p align="center">
22
<a href="http://badge.fury.io/js/jest"><img src="https://badge.fury.io/js/jest.svg" alt="npm version"></a>
3-
<a href="https://github.com/facebook/jest/blob/master/LICENSE">
3+
<a href="https://github.com/facebook/jest/blob/main/LICENSE">
44
<img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="Jest is released under the MIT license." />
55
</a>
66
<a href="https://twitter.com/intent/follow?screen_name=fbjest"><img align="center" src="https://img.shields.io/twitter/follow/fbjest.svg?style=social&label=Follow%20@fbjest" alt="Follow on Twitter"></a>

docs/Configuration.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ _Note: You can pass additional options to the istanbul reporter using the tuple
234234
["json", ["lcov", {"projectRoot": "../../"}]]
235235
```
236236

237-
For the additional information about the options object shape you can refer to `CoverageReporterWithOptions` type in the [type definitions](https://github.com/facebook/jest/tree/master/packages/jest-types/src/Config.ts).
237+
For the additional information about the options object shape you can refer to `CoverageReporterWithOptions` type in the [type definitions](https://github.com/facebook/jest/tree/main/packages/jest-types/src/Config.ts).
238238

239239
### `coverageThreshold` \[object]
240240

@@ -765,7 +765,7 @@ class MyCustomReporter {
765765
}
766766
```
767767

768-
For the full list of methods and argument types see `Reporter` interface in [packages/jest-reporters/src/types.ts](https://github.com/facebook/jest/blob/master/packages/jest-reporters/src/types.ts)
768+
For the full list of methods and argument types see `Reporter` interface in [packages/jest-reporters/src/types.ts](https://github.com/facebook/jest/blob/main/packages/jest-reporters/src/types.ts)
769769

770770
### `resetMocks` \[boolean]
771771

@@ -1067,7 +1067,7 @@ Pretty foo: Object {
10671067

10681068
To make a dependency explicit instead of implicit, you can call [`expect.addSnapshotSerializer`](ExpectAPI.md#expectaddsnapshotserializerserializer) to add a module for an individual test file instead of adding its path to `snapshotSerializers` in Jest configuration.
10691069

1070-
More about serializers API can be found [here](https://github.com/facebook/jest/tree/master/packages/pretty-format/README.md#serialize).
1070+
More about serializers API can be found [here](https://github.com/facebook/jest/tree/main/packages/pretty-format/README.md#serialize).
10711071

10721072
### `testEnvironment` \[string]
10731073

@@ -1090,7 +1090,7 @@ test('use jsdom in this test file', () => {
10901090

10911091
You can create your own module that will be used for setting up the test environment. The module must export a class with `setup`, `teardown` and `getVmContext` methods. You can also pass variables from this module to your test suites by assigning them to `this.global` object &ndash; this will make them available in your test suites as global variables.
10921092

1093-
The class may optionally expose an asynchronous `handleTestEvent` method to bind to events fired by [`jest-circus`](https://github.com/facebook/jest/tree/master/packages/jest-circus). Normally, `jest-circus` test runner would pause until a promise returned from `handleTestEvent` gets fulfilled, **except for the next events**: `start_describe_definition`, `finish_describe_definition`, `add_hook`, `add_test` or `error` (for the up-to-date list you can look at [SyncEvent type in the types definitions](https://github.com/facebook/jest/tree/master/packages/jest-types/src/Circus.ts)). That is caused by backward compatibility reasons and `process.on('unhandledRejection', callback)` signature, but that usually should not be a problem for most of the use cases.
1093+
The class may optionally expose an asynchronous `handleTestEvent` method to bind to events fired by [`jest-circus`](https://github.com/facebook/jest/tree/main/packages/jest-circus). Normally, `jest-circus` test runner would pause until a promise returned from `handleTestEvent` gets fulfilled, **except for the next events**: `start_describe_definition`, `finish_describe_definition`, `add_hook`, `add_test` or `error` (for the up-to-date list you can look at [SyncEvent type in the types definitions](https://github.com/facebook/jest/tree/main/packages/jest-types/src/Circus.ts)). That is caused by backward compatibility reasons and `process.on('unhandledRejection', callback)` signature, but that usually should not be a problem for most of the use cases.
10941094

10951095
Any docblock pragmas in test files will be passed to the environment constructor and can be used for per-test configuration. If the pragma does not have a value, it will be present in the object with its value set to an empty string. If the pragma is not present, it will not be present in the object.
10961096

@@ -1285,7 +1285,7 @@ function testRunner(
12851285
): Promise<TestResult>;
12861286
```
12871287

1288-
An example of such function can be found in our default [jasmine2 test runner package](https://github.com/facebook/jest/blob/master/packages/jest-jasmine2/src/index.ts).
1288+
An example of such function can be found in our default [jasmine2 test runner package](https://github.com/facebook/jest/blob/main/packages/jest-jasmine2/src/index.ts).
12891289

12901290
### `testSequencer` \[string]
12911291

@@ -1345,7 +1345,7 @@ If the value is `legacy`, the old implementation will be used as implementation
13451345

13461346
Default: `{"\\.[jt]sx?$": "babel-jest"}`
13471347

1348-
A map from regular expressions to paths to transformers. A transformer is a module that provides a synchronous function for transforming source files. For example, if you wanted to be able to use a new language feature in your modules or tests that aren't yet supported by node, you might plug in one of many compilers that compile a future version of JavaScript to a current one. Example: see the [examples/typescript](https://github.com/facebook/jest/blob/master/examples/typescript/package.json#L16) example or the [webpack tutorial](Webpack.md).
1348+
A map from regular expressions to paths to transformers. A transformer is a module that provides a synchronous function for transforming source files. For example, if you wanted to be able to use a new language feature in your modules or tests that aren't yet supported by node, you might plug in one of many compilers that compile a future version of JavaScript to a current one. Example: see the [examples/typescript](https://github.com/facebook/jest/blob/main/examples/typescript/package.json#L16) example or the [webpack tutorial](Webpack.md).
13491349

13501350
Examples of such compilers include:
13511351

@@ -1357,7 +1357,7 @@ You can pass configuration to a transformer like `{filePattern: ['path-to-transf
13571357

13581358
_Note: a transformer is only run once per file unless the file has changed. During the development of a transformer it can be useful to run Jest with `--no-cache` to frequently [delete Jest's cache](Troubleshooting.md#caching-issues)._
13591359

1360-
_Note: when adding additional code transformers, this will overwrite the default config and `babel-jest` is no longer automatically loaded. If you want to use it to compile JavaScript or Typescript, it has to be explicitly defined by adding `{"\\.[jt]sx?$": "babel-jest"}` to the transform property. See [babel-jest plugin](https://github.com/facebook/jest/tree/master/packages/babel-jest#setup)_
1360+
_Note: when adding additional code transformers, this will overwrite the default config and `babel-jest` is no longer automatically loaded. If you want to use it to compile JavaScript or Typescript, it has to be explicitly defined by adding `{"\\.[jt]sx?$": "babel-jest"}` to the transform property. See [babel-jest plugin](https://github.com/facebook/jest/tree/main/packages/babel-jest#setup)_
13611361

13621362
A transformer must be an object with at least a `process` function, and it's also recommended to include a `getCacheKey` function. If your transformer is written in ESM you should have a default export with that object.
13631363

docs/ExpectAPI.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ A boolean to let you know this matcher was called with an `expand` option. When
151151

152152
#### `this.utils`
153153

154-
There are a number of helpful tools exposed on `this.utils` primarily consisting of the exports from [`jest-matcher-utils`](https://github.com/facebook/jest/tree/master/packages/jest-matcher-utils).
154+
There are a number of helpful tools exposed on `this.utils` primarily consisting of the exports from [`jest-matcher-utils`](https://github.com/facebook/jest/tree/main/packages/jest-matcher-utils).
155155

156156
The most useful ones are `matcherHint`, `printExpected` and `printReceived` to format the error messages nicely. For example, take a look at the implementation for the `toBe` matcher:
157157

docs/JestObjectAPI.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@ jest.setTimeout(1000); // 1 second
672672

673673
### `jest.retryTimes()`
674674

675-
Runs failed tests n-times until they pass or until the max number of retries is exhausted. This only works with the default [jest-circus](https://github.com/facebook/jest/tree/master/packages/jest-circus) runner!
675+
Runs failed tests n-times until they pass or until the max number of retries is exhausted. This only works with the default [jest-circus](https://github.com/facebook/jest/tree/main/packages/jest-circus) runner!
676676

677677
Example in a test:
678678

docs/JestPlatform.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ getChangedFilesForRoots(['./'], {
2323
}).then(result => console.log(result.changedFiles));
2424
```
2525

26-
You can read more about `jest-changed-files` in the [readme file](https://github.com/facebook/jest/blob/master/packages/jest-changed-files/README.md).
26+
You can read more about `jest-changed-files` in the [readme file](https://github.com/facebook/jest/blob/main/packages/jest-changed-files/README.md).
2727

2828
## jest-diff
2929

@@ -68,7 +68,7 @@ const parsed = parseWithComments(code);
6868
console.log(parsed);
6969
```
7070

71-
You can read more about `jest-docblock` in the [readme file](https://github.com/facebook/jest/blob/master/packages/jest-docblock/README.md).
71+
You can read more about `jest-docblock` in the [readme file](https://github.com/facebook/jest/blob/main/packages/jest-docblock/README.md).
7272

7373
## jest-get-type
7474

@@ -115,7 +115,7 @@ const result = validate(configByUser, {
115115
console.log(result);
116116
```
117117

118-
You can read more about `jest-validate` in the [readme file](https://github.com/facebook/jest/blob/master/packages/jest-validate/README.md).
118+
You can read more about `jest-validate` in the [readme file](https://github.com/facebook/jest/blob/main/packages/jest-validate/README.md).
119119

120120
## jest-worker
121121

@@ -151,7 +151,7 @@ async function main() {
151151
main();
152152
```
153153

154-
You can read more about `jest-worker` in the [readme file](https://github.com/facebook/jest/blob/master/packages/jest-worker/README.md).
154+
You can read more about `jest-worker` in the [readme file](https://github.com/facebook/jest/blob/main/packages/jest-worker/README.md).
155155

156156
## pretty-format
157157

@@ -171,4 +171,4 @@ val.array = [-0, Infinity, NaN];
171171
console.log(prettyFormat(val));
172172
```
173173

174-
You can read more about `pretty-format` in the [readme file](https://github.com/facebook/jest/blob/master/packages/pretty-format/README.md).
174+
You can read more about `pretty-format` in the [readme file](https://github.com/facebook/jest/blob/main/packages/pretty-format/README.md).

docs/ManualMocks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ The example mock shown here uses [`jest.createMockFromModule`](JestObjectAPI.md#
127127

128128
To ensure that a manual mock and its real implementation stay in sync, it might be useful to require the real module using [`jest.requireActual(moduleName)`](JestObjectAPI.md#jestrequireactualmodulename) in your manual mock and amending it with mock functions before exporting it.
129129

130-
The code for this example is available at [examples/manual-mocks](https://github.com/facebook/jest/tree/master/examples/manual-mocks).
130+
The code for this example is available at [examples/manual-mocks](https://github.com/facebook/jest/tree/main/examples/manual-mocks).
131131

132132
## Using with ES module imports
133133

docs/MockFunctionAPI.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ If you are using [Create React App](https://create-react-app.dev) then the [Type
327327

328328
Otherwise, please see our [Getting Started](GettingStarted.md#using-typescript) guide for to get setup with TypeScript.
329329

330-
You can see an example of using Jest with TypeScript in our [GitHub repository](https://github.com/facebook/jest/tree/master/examples/typescript).
330+
You can see an example of using Jest with TypeScript in our [GitHub repository](https://github.com/facebook/jest/tree/main/examples/typescript).
331331

332332
### `jest.MockedFunction`
333333

docs/MoreResources.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ By now you should have a good idea of how Jest can help you test your applicatio
1515

1616
## Learn by example
1717

18-
You will find a number of example test cases in the [`examples`](https://github.com/facebook/jest/tree/master/examples) folder on GitHub. You can also learn from the excellent tests used by the [React](https://github.com/facebook/react/tree/master/packages/react/src/__tests__), [Relay](https://github.com/facebook/relay/tree/master/packages/react-relay/__tests__), and [React Native](https://github.com/facebook/react-native/tree/master/Libraries/Animated/src/__tests__) projects.
18+
You will find a number of example test cases in the [`examples`](https://github.com/facebook/jest/tree/main/examples) folder on GitHub. You can also learn from the excellent tests used by the [React](https://github.com/facebook/react/tree/main/packages/react/src/__tests__), [Relay](https://github.com/facebook/relay/tree/main/packages/react-relay/__tests__), and [React Native](https://github.com/facebook/react-native/tree/main/Libraries/Animated/src/__tests__) projects.
1919

2020
## Join the community
2121

0 commit comments

Comments
 (0)