From 7fe5d5ccbdf31d662ad25ac0169a27cfd65f3111 Mon Sep 17 00:00:00 2001 From: "Rico Sta. Cruz" Date: Fri, 1 Sep 2017 05:21:54 +0800 Subject: [PATCH] jest: deemphasize async --- jest.md | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/jest.md b/jest.md index 74603696a..980999ae8 100644 --- a/jest.md +++ b/jest.md @@ -54,26 +54,6 @@ describe('My work', () => { `it` is an alias for `test`. See: [test()](http://facebook.github.io/jest/docs/en/api.html#testname-fn) -### Asynchronous tests - -```js -test('works with promises', () => { - return new Promise((resolve, reject) => { - ··· - }) -}) -``` - -```js -test('works with async/await', async () => { - const hello = await foo() - ··· -}) -``` - -Return promises, or use async/await. -See: [Async tutorial](http://facebook.github.io/jest/docs/en/tutorial-async.html) - ### Setup ```js @@ -199,6 +179,26 @@ expect.assertions(1) More features ------------- +### Asynchronous tests + +```js +test('works with promises', () => { + return new Promise((resolve, reject) => { + ··· + }) +}) +``` + +```js +test('works with async/await', async () => { + const hello = await foo() + ··· +}) +``` + +Return promises, or use async/await. +See: [Async tutorial](http://facebook.github.io/jest/docs/en/tutorial-async.html) + ### Snapshots ```jsx