This repository has been archived by the owner on Jul 9, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Babel preset: Enable support for async generator functions (#126)
* Babel preset: Enabled support for async generator functions * Babel preset: Add unit tests for async generator functions * Babel preset: Update changelog
- Loading branch information
Showing
4 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
## 1.3.0 (2018-05-22) | ||
|
||
- Added support for async generator functions ([#126](https://github.com/WordPress/packages/pull/126)) | ||
|
||
## 1.2.1 (2018-05-18) | ||
|
||
- Fix: Standardized `package.json` format ([#119](https://github.com/WordPress/packages/pull/119)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
describe( 'Babel preset default', () => { | ||
async function* foo() { | ||
await 1; | ||
yield 2; | ||
} | ||
|
||
test( 'support for async generator functions', async () => { | ||
const generator = foo(); | ||
|
||
expect( await generator.next() ).toEqual( { | ||
done: false, | ||
value: 2, | ||
} ); | ||
} ); | ||
} ); |