Skip to content

Commit

Permalink
Rename all links to main (#11856)
Browse files Browse the repository at this point in the history
  • Loading branch information
rickhanlonii committed Sep 8, 2021
1 parent 3b7536f commit d6e5ddb
Show file tree
Hide file tree
Showing 91 changed files with 204 additions and 204 deletions.
10 changes: 5 additions & 5 deletions CHANGELOG.md
@@ -1,4 +1,4 @@
## master
## main

### Features

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

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

Expand Down Expand Up @@ -2240,7 +2240,7 @@ We skipped 24.2.0 because a draft was accidentally published. Please use `24.3.0
- Support maxDepth option in React plugins ([#4208](https://github.com/facebook/jest/pull/4208))
- Support SVG elements in HTMLElement plugin ([#4335](https://github.com/facebook/jest/pull/4335))
- Test empty Immutable collections with {min: false} option ([#4121](https://github.com/facebook/jest/pull/4121))
- test to debug travis failure in master ([#4145](https://github.com/facebook/jest/pull/4145))
- test to debug travis failure in main ([#4145](https://github.com/facebook/jest/pull/4145))
- testPathPattern message test ([#4006](https://github.com/facebook/jest/pull/4006))
- Throw Error When Using Nested It Specs ([#4039](https://github.com/facebook/jest/pull/4039))
- Throw when moduleNameMapper points to inexistent module ([#3567](https://github.com/facebook/jest/pull/3567))
Expand Down Expand Up @@ -2430,7 +2430,7 @@ See https://jestjs.io/blog/2016/12/15/2016-in-jest
- Renamed `--jsonOutputFile` to `--outputFile`.
- Added `jest-editor-support` for vscode and Nuclide integration.
- Fixed `test.concurrent` unhandled promise rejections.
- The Jest website is now auto-deployed when merging into master.
- The Jest website is now auto-deployed when merging into main.
- Updated `testRegex` to include `test.js` and `spec.js` files.
- Fixes for `babel-plugin-jest-hoist` when using `jest.mock` with three arguments.
- The `JSON` global in `jest-environment-node` now comes from the vm context instead of the parent context.
Expand Down Expand Up @@ -2751,7 +2751,7 @@ See https://jestjs.io/blog/2016/12/15/2016-in-jest
- 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.
- 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:
- Example: http://astexplorer.net/#/zrybZ6UvRA
- Codemod: https://github.com/cpojer/js-codemod/blob/master/transforms/jest-update.js
- Codemod: https://github.com/cpojer/js-codemod/blob/main/transforms/jest-update.js
- jscodeshift: https://github.com/facebook/jscodeshift
- Removed `navigator.onLine` and `mockSetReadOnlyProperty` from the global jsdom environment. Use `window.navigator.onLine = true;` in your test setup and `Object.defineProperty` instead.

Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Expand Up @@ -10,17 +10,17 @@ Facebook has adopted a Code of Conduct that we expect project participants to ad

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.

### `master` is unsafe
### `main` is unsafe

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.
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.

### Workflow and Pull Requests

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.

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

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/
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/

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

Expand Down
2 changes: 1 addition & 1 deletion README.md
@@ -1,6 +1,6 @@
<p align="center">
<a href="http://badge.fury.io/js/jest"><img src="https://badge.fury.io/js/jest.svg" alt="npm version"></a>
<a href="https://github.com/facebook/jest/blob/master/LICENSE">
<a href="https://github.com/facebook/jest/blob/main/LICENSE">
<img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="Jest is released under the MIT license." />
</a>
<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>
Expand Down
14 changes: 7 additions & 7 deletions docs/Configuration.md
Expand Up @@ -234,7 +234,7 @@ _Note: You can pass additional options to the istanbul reporter using the tuple
["json", ["lcov", {"projectRoot": "../../"}]]
```

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).
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).

### `coverageThreshold` \[object]

Expand Down Expand Up @@ -765,7 +765,7 @@ class MyCustomReporter {
}
```

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)
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)

### `resetMocks` \[boolean]

Expand Down Expand Up @@ -1067,7 +1067,7 @@ Pretty foo: Object {

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.

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

### `testEnvironment` \[string]

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

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.

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.
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.

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.

Expand Down Expand Up @@ -1285,7 +1285,7 @@ function testRunner(
): Promise<TestResult>;
```

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).
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).

### `testSequencer` \[string]

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

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

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).
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).

Examples of such compilers include:

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

_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)._

_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)_
_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)_

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.

Expand Down
2 changes: 1 addition & 1 deletion docs/ExpectAPI.md
Expand Up @@ -151,7 +151,7 @@ A boolean to let you know this matcher was called with an `expand` option. When

#### `this.utils`

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).
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).

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:

Expand Down
2 changes: 1 addition & 1 deletion docs/JestObjectAPI.md
Expand Up @@ -672,7 +672,7 @@ jest.setTimeout(1000); // 1 second

### `jest.retryTimes()`

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!
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!

Example in a test:

Expand Down
10 changes: 5 additions & 5 deletions docs/JestPlatform.md
Expand Up @@ -23,7 +23,7 @@ getChangedFilesForRoots(['./'], {
}).then(result => console.log(result.changedFiles));
```

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).
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).

## jest-diff

Expand Down Expand Up @@ -68,7 +68,7 @@ const parsed = parseWithComments(code);
console.log(parsed);
```

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

## jest-get-type

Expand Down Expand Up @@ -115,7 +115,7 @@ const result = validate(configByUser, {
console.log(result);
```

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

## jest-worker

Expand Down Expand Up @@ -151,7 +151,7 @@ async function main() {
main();
```

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

## pretty-format

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

You can read more about `pretty-format` in the [readme file](https://github.com/facebook/jest/blob/master/packages/pretty-format/README.md).
You can read more about `pretty-format` in the [readme file](https://github.com/facebook/jest/blob/main/packages/pretty-format/README.md).
2 changes: 1 addition & 1 deletion docs/ManualMocks.md
Expand Up @@ -127,7 +127,7 @@ The example mock shown here uses [`jest.createMockFromModule`](JestObjectAPI.md#

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.

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

## Using with ES module imports

Expand Down
2 changes: 1 addition & 1 deletion docs/MockFunctionAPI.md
Expand Up @@ -327,7 +327,7 @@ If you are using [Create React App](https://create-react-app.dev) then the [Type

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

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

### `jest.MockedFunction`

Expand Down
2 changes: 1 addition & 1 deletion docs/MoreResources.md
Expand Up @@ -15,7 +15,7 @@ By now you should have a good idea of how Jest can help you test your applicatio

## Learn by example

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.
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.

## Join the community

Expand Down

0 comments on commit d6e5ddb

Please sign in to comment.