Skip to content

Commit

Permalink
Use prettier@1.8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Nov 7, 2017
1 parent e5087e4 commit 5148078
Show file tree
Hide file tree
Showing 16 changed files with 95 additions and 94 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Before creating an issue please check the following:
* run Jest once with `--no-cache` to see if that fixes the problem you are experiencing.
-->

**Do you want to request a _feature_ or report a *bug*?**
**Do you want to request a _feature_ or report a _bug_?**

**What is the current behavior?**

Expand Down
8 changes: 6 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,15 @@ _Before_ submitting a pull request, please make sure the following is done…
[Yarn](https://yarnpkg.com/en/docs/install#windows-tab) on Windows you may
need to download either node.js or Chocolatey<br />
yarn install
```sh
yarn install
```
To check your version of Yarn and ensure it's installed you can type:

yarn --version
```sh
yarn --version
```

4. If you've added code that should be tested, add tests. You can use watch mode
that continuously transforms changed files to make your life easier.
Expand Down
2 changes: 1 addition & 1 deletion docs/CLI.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ Note that `column` is 0-indexed while `line` is not.
```json
{
"column": 4,
"line": 5,
"line": 5
}
```

Expand Down
33 changes: 15 additions & 18 deletions docs/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ settings:
{
"name": "my-project",
"jest": {
"verbose": true,
},
"verbose": true
}
}
```

Expand All @@ -34,7 +34,7 @@ When using the --config option, the JSON file must not contain a "jest" key:
```json
{
"bail": true,
"verbose": true,
"verbose": true
}
```

Expand Down Expand Up @@ -118,8 +118,8 @@ Example:
"collectCoverageFrom": [
"**/*.{js,jsx}",
"!**/node_modules/**",
"!**/vendor/**",
],
"!**/vendor/**"
]
}
```

Expand Down Expand Up @@ -278,8 +278,7 @@ module's location. Setting this option will _override_ the default, if you wish
to still search `node_modules` for packages include it along with any other
options: `["node_modules", "bower_components"]`

### `moduleNameMapper` [object<string,
string>]
### `moduleNameMapper` [object<string, string>]

Default: `null`

Expand All @@ -302,8 +301,8 @@ Example:
"moduleNameMapper": {
"^image![a-zA-Z0-9$_-]+$": "GlobalImageStub",
"^[./a-zA-Z0-9$_-]+\\.png$": "<rootDir>/RelativeImageStub.js",
"module_name_(.*)": "<rootDir>/substituted_module_$1.js",
},
"module_name_(.*)": "<rootDir>/substituted_module_$1.js"
}
}
```

Expand Down Expand Up @@ -359,7 +358,7 @@ time.

```json
{
"projects": ["<rootDir>", "<rootDir>/examples/*"],
"projects": ["<rootDir>", "<rootDir>/examples/*"]
}
```

Expand All @@ -375,8 +374,7 @@ Automatically clear mock calls and instances between every test. Equivalent to
calling `jest.clearAllMocks()` between each test. This does not remove any mock
implementation that may have been provided.

### `reporters` [array<moduleName | [moduleName,
options]>]
### `reporters` [array<moduleName | [moduleName, options]>]

Default: `undefined`

Expand All @@ -393,7 +391,7 @@ This will override default reporters:

```json
{
"reporters": ["<rootDir>/my-custom-reporter.js"],
"reporters": ["<rootDir>/my-custom-reporter.js"]
}
```

Expand All @@ -402,7 +400,7 @@ provides:

```json
{
"reporters": ["default", "<rootDir>/my-custom-reporter.js"],
"reporters": ["default", "<rootDir>/my-custom-reporter.js"]
}
```

Expand All @@ -413,8 +411,8 @@ as a second argument:
{
"reporters": [
"default",
["<rootDir>/my-custom-reporter.js", {"banana": "yes", "pineapple": "no"}],
],
["<rootDir>/my-custom-reporter.js", {"banana": "yes", "pineapple": "no"}]
]
}
```

Expand Down Expand Up @@ -835,8 +833,7 @@ Setting this value to `fake` allows the use of fake timers for functions such as
`setTimeout`. Fake timers are useful when a piece of code sets a long timeout
that we don't want to wait for in a test.

### `transform` [object<string,
string>]
### `transform` [object<string, string>]

Default: `undefined`

Expand Down
2 changes: 1 addition & 1 deletion docs/ExpectAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ cases.

Use `.toBeDefined` to check that a variable is not undefined. For example, if
you just want to check that a function `fetchNewFlavorIdea()` returns
*something*, you can write:
_something_, you can write:

```js
test('there is a new flavor idea', () => {
Expand Down
16 changes: 8 additions & 8 deletions docs/GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ Add the following section to your `package.json`:
```json
{
"scripts": {
"test": "jest",
},
"test": "jest"
}
}
```

Expand Down Expand Up @@ -95,7 +95,7 @@ in your project's root folder. For example, if you are using ES6 and

```json
{
"presets": ["es2015", "react"],
"presets": ["es2015", "react"]
}
```

Expand All @@ -115,9 +115,9 @@ You are now set up to use all ES6 features and React specific syntax.
"presets": [["es2015", {"modules": false}], "react"],
"env": {
"test": {
"presets": [["es2015"], "react"],
},
},
"presets": [["es2015"], "react"]
}
}
}
```

Expand All @@ -130,8 +130,8 @@ You are now set up to use all ES6 features and React specific syntax.
{
// package.json
"jest": {
"transform": {},
},
"transform": {}
}
}
```

Expand Down
22 changes: 11 additions & 11 deletions docs/Troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ Then attach VS Code's debugger using the following `launch.json` config:
"type": "node",
"request": "attach",
"name": "Attach",
"port": 9229,
},
],
"port": 9229
}
]
}
```

Expand All @@ -85,12 +85,12 @@ following configuration:
"runtimeArgs": [
"--inspect-brk",
"${workspaceRoot}/node_modules/.bin/jest",
"--runInBand",
"--runInBand"
],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
},
],
"internalConsoleOptions": "neverOpen"
}
]
}
```

Expand All @@ -112,9 +112,9 @@ can debug your Jest tests with the following configuration:
"cwd": "${workspaceRoot}",
"protocol": "inspector",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
},
],
"internalConsoleOptions": "neverOpen"
}
]
}
```

Expand Down Expand Up @@ -199,7 +199,7 @@ npm test -- --runInBand
```

Another alternative to expediting test execution time on Continuous Integration
Servers such as Travis-CI is to set the max worker pool to ~*4*. Specifically on
Servers such as Travis-CI is to set the max worker pool to ~_4_. Specifically on
Travis-CI, this can reduce test execution time in half. Note: The Travis CI
_free_ plan available for open source projects only includes 2 CPU cores.

Expand Down
2 changes: 1 addition & 1 deletion docs/TutorialReact.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jest configuration entries:
```json
{
// .babelrc
"presets": ["es2015", "react"],
"presets": ["es2015", "react"]
}
```

Expand Down
50 changes: 25 additions & 25 deletions docs/Webpack.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ mock a proxy for your className lookups.
"moduleNameMapper": {
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$":
"<rootDir>/__mocks__/fileMock.js",
"\\.(css|less)$": "<rootDir>/__mocks__/styleMock.js",
},
},
"\\.(css|less)$": "<rootDir>/__mocks__/styleMock.js"
}
}
}
```

Expand Down Expand Up @@ -101,9 +101,9 @@ Testing](SnapshotTesting.md).
"moduleNameMapper": {
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$":
"<rootDir>/__mocks__/fileMock.js",
"\\.(css|less)$": "identity-obj-proxy",
},
},
"\\.(css|less)$": "identity-obj-proxy"
}
}
}
```

Expand Down Expand Up @@ -133,13 +133,13 @@ module.exports = {
// package.json (for custom transformers and CSS Modules)
"jest": {
"moduleNameMapper": {
"\\.(css|less)$": "identity-obj-proxy",
"\\.(css|less)$": "identity-obj-proxy"
},
"transform": {
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$":
"<rootDir>/fileTransformer.js",
},
},
"<rootDir>/fileTransformer.js"
}
}
}
```

Expand Down Expand Up @@ -174,9 +174,9 @@ direct analogs in Jest's `moduleDirectories` and `moduleFileExtensions` options.

"moduleNameMapper": {
"\\.(css|less)$": "<rootDir>/__mocks__/styleMock.js",
"\\.(gif|ttf|eot|svg)$": "<rootDir>/__mocks__/fileMock.js",
},
},
"\\.(gif|ttf|eot|svg)$": "<rootDir>/__mocks__/fileMock.js"
}
}
}
```

Expand All @@ -196,9 +196,9 @@ env variable, which you can set, or make use of the `modulePaths` option.
"moduleDirectories": ["node_modules", "bower_components", "shared"],
"moduleNameMapper": {
"\\.(css|less)$": "<rootDir>/__mocks__/styleMock.js",
"\\.(gif|ttf|eot|svg)$": "<rootDir>/__mocks__/fileMock.js",
},
},
"\\.(gif|ttf|eot|svg)$": "<rootDir>/__mocks__/fileMock.js"
}
}
}
```

Expand All @@ -218,9 +218,9 @@ make use of the `moduleNameMapper` option again.
"^config$": "<rootDir>/configs/app-config.js",

"\\.(css|less)$": "<rootDir>/__mocks__/styleMock.js",
"\\.(gif|ttf|eot|svg)$": "<rootDir>/__mocks__/fileMock.js",
},
},
"\\.(gif|ttf|eot|svg)$": "<rootDir>/__mocks__/fileMock.js"
}
}
}
```

Expand All @@ -247,9 +247,9 @@ ES modules to CommonJS modules only in the `test` environment.

"env": {
"test": {
"plugins": ["transform-es2015-modules-commonjs"],
},
},
"plugins": ["transform-es2015-modules-commonjs"]
}
}
}
```

Expand All @@ -268,9 +268,9 @@ need to enable the `dynamic-import-node` plugin.

"env": {
"test": {
"plugins": ["dynamic-import-node"],
},
},
"plugins": ["dynamic-import-node"]
}
}
}
```

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"mkdirp": "^0.5.1",
"mocha": "^4.0.1",
"mock-fs": "^4.4.1",
"prettier": "^1.8.0",
"prettier": "^1.8.1",
"progress": "^2.0.0",
"react": "^15.4.2",
"react-addons-test-utils": "15.4.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-plugin-jest-hoist/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ $ npm install babel-plugin-jest-hoist

```json
{
"plugins": ["jest-hoist"],
"plugins": ["jest-hoist"]
}
```

Expand Down
2 changes: 1 addition & 1 deletion packages/babel-preset-jest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ $ npm install --save-dev babel-preset-jest

```json
{
"presets": ["jest"],
"presets": ["jest"]
}
```

Expand Down
Loading

0 comments on commit 5148078

Please sign in to comment.