Skip to content

Commit

Permalink
Update loads of dependencies (#4929)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB authored and cpojer committed Nov 21, 2017
1 parent 46bb771 commit b5592f4
Show file tree
Hide file tree
Showing 17 changed files with 576 additions and 530 deletions.
2 changes: 1 addition & 1 deletion .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ include_warnings=true
emoji=true

[version]
^0.58.0
^0.59.0
24 changes: 13 additions & 11 deletions docs/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,14 +165,16 @@ _Note: Setting this option overwrites the default values. Add `"text"` or
Default: `undefined`

This will be used to configure minimum threshold enforcement for coverage
results. Thresholds can be specified as `global`, as
a [glob](https://github.com/isaacs/node-glob#glob-primer), and as a directory or
results. Thresholds can be specified as `global`, as a
[glob](https://github.com/isaacs/node-glob#glob-primer), and as a directory or
file path. If thresholds aren't met, jest will fail. Thresholds specified as a
positive number are taken to be the minimum percentage required. Thresholds
specified as a negative number represent the maximum number of uncovered
entities allowed.

For example, with the following configuration jest will fail if there is less than 80% branch, line, and function coverage, or if there are more than 10 uncovered statements:
For example, with the following configuration jest will fail if there is less
than 80% branch, line, and function coverage, or if there are more than 10
uncovered statements:

```json
{
Expand All @@ -192,8 +194,8 @@ For example, with the following configuration jest will fail if there is less th

If globs or paths are specified alongside `global`, coverage data for matching
paths will be subtracted from overall coverage and thresholds will be applied
independently. Thresholds for globs are applied to all files matching the
glob. If the file specified by path is not found, error is returned.
independently. Thresholds for globs are applied to all files matching the glob.
If the file specified by path is not found, error is returned.

For example, with the following configuration:

Expand Down Expand Up @@ -228,12 +230,12 @@ For example, with the following configuration:

Jest will fail if:

- The `./src/components` directory has less than 40% branch or statement coverage.
- One of the files matching the `./src/reducers/**/*.js` glob has less than 90%
statement coverage.
- The `./src/api/very-important-module.js` file has less than 100% coverage.
- Every remaining file combined has less than 50% coverage (`global`).

* The `./src/components` directory has less than 40% branch or statement
coverage.
* One of the files matching the `./src/reducers/**/*.js` glob has less than 90%
statement coverage.
* The `./src/api/very-important-module.js` file has less than 100% coverage.
* Every remaining file combined has less than 50% coverage (`global`).

### `globals` [object]

Expand Down
4 changes: 3 additions & 1 deletion docs/ExpectAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,9 @@ For example, this code tests that the promise rejects with reason `'octopus'`:
```js
test('rejects to octopus', () => {
// make sure to add a return statement
return expect(Promise.reject(new Error('octopus'))).rejects.toThrow('octopus');
return expect(Promise.reject(new Error('octopus'))).rejects.toThrow(
'octopus',
);
});
```

Expand Down
1 change: 1 addition & 0 deletions docs/GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ npm install --save-dev babel-jest babel-core regenerator-runtime

> Note: If you are using a babel version 7 then you need to install `babel-jest`
> with the following command:
>
> ```
> npm install --save-dev babel-jest babel-core@^7.0.0-0 @babel/core regenerator-runtime
> ```
Expand Down
20 changes: 10 additions & 10 deletions docs/SetupAndTeardown.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,17 +120,17 @@ the `describe` block. It may help to illustrate the order of execution of all
hooks.

```js
beforeAll(() => console.log("1 - beforeAll"));
afterAll(() => console.log("1 - afterAll"));
beforeEach(() => console.log("1 - beforeEach"));
afterEach(() => console.log("1 - afterEach"));
test('', () => console.log("1 - test"));
beforeAll(() => console.log('1 - beforeAll'));
afterAll(() => console.log('1 - afterAll'));
beforeEach(() => console.log('1 - beforeEach'));
afterEach(() => console.log('1 - afterEach'));
test('', () => console.log('1 - test'));
describe('Scoped / Nested block', () => {
beforeAll(() => console.log("2 - beforeAll"));
afterAll(() => console.log("2 - afterAll"));
beforeEach(() => console.log("2 - beforeEach"));
afterEach(() => console.log("2 - afterEach"));
test('', () => console.log("2 - test"));
beforeAll(() => console.log('2 - beforeAll'));
afterAll(() => console.log('2 - afterAll'));
beforeEach(() => console.log('2 - beforeEach'));
afterEach(() => console.log('2 - afterEach'));
test('', () => console.log('2 - test'));
});

// 1 - beforeAll
Expand Down
4 changes: 2 additions & 2 deletions docs/UsingMatchers.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ won't do much with these expectation objects except call matchers on them. In
this code, `.toBe(4)` is the matcher. When Jest runs, it tracks all the failing
matchers so that it can print out nice error messages for you.

`toBe` uses `Object.is` to test exact equality. If you want to check the value of an
object, use `toEqual` instead:
`toBe` uses `Object.is` to test exact equality. If you want to check the value
of an object, use `toEqual` instead:

```js
test('object assignment', () => {
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"lerna": "2.4.0",
"lerna": "2.5.1",
"version": "21.2.1",
"npmClient": "yarn",
"useWorkspaces": true
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"babel-preset-react-native": "^1.9.1",
"browserify": "^14.4.0",
"chalk": "^2.0.1",
"codecov": "^2.3.0",
"codecov": "^3.0.0",
"cross-spawn": "^5.1.0",
"debug": "^3.0.1",
"enzyme": "^2.8.2",
Expand All @@ -36,7 +36,7 @@
"eslint-plugin-react": "^7.1.0",
"eslint-plugin-relay": "0.0.8",
"eslint-plugin-unicorn": "^2.1.2",
"flow-bin": "^0.58.0",
"flow-bin": "^0.59.0",
"glob": "^7.1.1",
"graceful-fs": "^4.1.11",
"immutable": "^4.0.0-rc.7",
Expand All @@ -49,7 +49,7 @@
"karma-chrome-launcher": "^2.1.1",
"karma-mocha": "^1.3.0",
"left-pad": "^1.1.1",
"lerna": "2.4.0",
"lerna": "2.5.1",
"micromatch": "^2.3.11",
"mkdirp": "^0.5.1",
"mocha": "^4.0.1",
Expand All @@ -63,7 +63,7 @@
"regenerator-runtime": "^0.11.0",
"resolve": "^1.4.0",
"rimraf": "^2.6.2",
"rollup": "^0.50.0",
"rollup": "^0.51.0",
"rollup-plugin-babel": "^3.0.2",
"rollup-plugin-commonjs": "^8.2.1",
"rollup-plugin-flow": "^1.1.1",
Expand Down
1 change: 1 addition & 0 deletions packages/babel-jest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ npm install --save-dev babel-jest babel-core
```

> Note: If you are using babel version 7 you have to install `babel-jest` with
>
> ```
> npm install --save-dev babel-jest babel-core@^7.0.0-0 @babel/core
> ```
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config-fb-strict/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"eslint-config-fbjs": "^2.0.0"
},
"peerDependencies": {
"babel-eslint": "^7.2.3",
"babel-eslint": "^7.2.3 || ^8.0.0",
"eslint": "^4.2.0",
"eslint-plugin-babel": "^4.1.1",
"eslint-plugin-flowtype": "^2.35.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"string-length": "^2.0.0",
"strip-ansi": "^4.0.0",
"which": "^1.2.12",
"yargs": "^9.0.0"
"yargs": "^10.0.3"
},
"bin": {
"jest": "./bin/jest.js"
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-cli/src/reporters/coverage_reporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ export default class CoverageReporter extends BaseReporter {
errors.push(
`Jest: "${name}" coverage threshold for ${key} (${
threshold
}%) not met: ` + `${actual}%`,
}%) not met: ${actual}%`,
);
}
}
Expand Down
2 changes: 0 additions & 2 deletions packages/jest-environment-jsdom/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ class JSDOMEnvironment {
moduleMocker: ?ModuleMocker;

constructor(config: ProjectConfig) {
const jsdomInitialized = process.hrtime();

this.dom = new JSDOM('<!DOCTYPE html>', {
pretendToBeVisual: true,
runScripts: 'dangerously',
Expand Down
4 changes: 3 additions & 1 deletion packages/jest-leak-detector/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

Module for verifying whether an object has been garbage collected or not.

Internally creates a weak reference to the object, and forces garbage collection to happen. If the reference is gone, it meant no one else was pointing to the object.
Internally creates a weak reference to the object, and forces garbage collection
to happen. If the reference is gone, it meant no one else was pointing to the
object.

## Example

Expand Down
2 changes: 1 addition & 1 deletion packages/jest-repl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"jest-runtime": "^21.2.1",
"jest-util": "^21.2.1",
"repl": "^0.1.3",
"yargs": "^9.0.0"
"yargs": "^10.0.3"
},
"bin": {
"jest-repl": "./bin/jest-repl.js"
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"slash": "^1.0.0",
"strip-bom": "3.0.0",
"write-file-atomic": "^2.1.0",
"yargs": "^9.0.0"
"yargs": "^10.0.3"
},
"devDependencies": {
"jest-environment-jsdom": "^21.2.1",
Expand Down
Loading

0 comments on commit b5592f4

Please sign in to comment.