Skip to content

Commit

Permalink
Merge pull request #1 from facebook/master
Browse files Browse the repository at this point in the history
Update from master
  • Loading branch information
gricard authored Oct 2, 2017
2 parents 9548c16 + 7aa3017 commit 5ed77b0
Show file tree
Hide file tree
Showing 47 changed files with 2,133 additions and 146 deletions.
2 changes: 2 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ module.exports = {
'packages/jest-editor-support/src/Process.js',
'packages/jest-editor-support/src/Runner.js',
'packages/jest-editor-support/src/Settings.js',
'packages/jest-editor-support/src/Snapshot.js',
'packages/jest-editor-support/src/__tests__/Snapshot-test.js',
'packages/jest-jasmine2/src/jasmine/Env.js',
'packages/jest-jasmine2/src/jasmine/Spec.js',
'packages/jest-jasmine2/src/jasmine/Suite.js',
Expand Down
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

# Pings orta when PRs are to this module
packages/jest-editor-support/* @orta
packages/jest-editor-support/src/* @orta
12 changes: 7 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
{
"jest.pathToJest": "yarn jest --",
"editor.rulers": [80],
"files.exclude": {
"**/.git": true,
"**/node_modules": true,
"**/build": true
},
"editor.formatOnSave": true,
"flow.useNPMPackagedFlow": true,
"javascript.validate.enable": false,
"jest.pathToJest": "yarn jest --",
"prettier.eslintIntegration": true,
"prettier.parser": "flow",
"prettier.printWidth": 80,
"prettier.singleQuote": true,
"prettier.trailingComma": "all",
"prettier.semi": true,
"editor.formatOnSave": true,
"prettier.eslintIntegration": true
"prettier.singleQuote": true,
"prettier.trailingComma": "all"
}
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ init:
install:
- ps: Install-Product node $env:nodejs_version x64
- node --version
- curl -fsSL -o yarn.js https://github.com/yarnpkg/yarn/releases/download/v0.28.4/yarn-0.28.4.js
- curl -fsSL -o yarn.js https://github.com/yarnpkg/yarn/releases/download/v1.1.0/yarn-1.1.0.js
- node ./yarn.js --version
- node ./yarn.js install
- node ./yarn.js run build
Expand All @@ -20,7 +20,7 @@ cache:
- .eslintcache

test_script:
- node ./yarn.js run jest -- --color
- node ./yarn.js run jest --color

# Don't actually build.
build: off
Expand Down
3 changes: 2 additions & 1 deletion docs/en/GlobalAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,8 @@ test('did not rain', () => {

The first argument is the test name; the second argument is a function that contains the expectations to test.

If a promise is returned from `test`, Jest will wait for the promise to resolve before letting the test complete.
> Note: If a **promise is returned** from `test`, Jest will wait for the promise to resolve before letting the test complete.
Jest will also wait if you **provide an argument to the test function**, usually called `done`. This could be handy when you want to test callbacks. See how to test async code [here](http://facebook.github.io/jest/docs/en/asynchronous.html#callbacks).

For example, let's say `fetchBeverageList()` returns a promise that is supposed to resolve to a list that has `lemon` in it. You can test this with:

Expand Down
Loading

0 comments on commit 5ed77b0

Please sign in to comment.