Skip to content

Commit

Permalink
Adds support for using async inside the babel runtime (jestjs#2199)
Browse files Browse the repository at this point in the history
* Adds support for using `async` inside the babel runtime

* Update integration tests
  • Loading branch information
orta authored and cpojer committed Dec 1, 2016
1 parent 90262b1 commit 41cd9dd
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"syntax-trailing-function-commas",
"transform-flow-strip-types",
"transform-es2015-destructuring",
"transform-es2015-parameters"
"transform-es2015-parameters",
"transform-async-to-generator"
],
"retainLines": true
}
2 changes: 1 addition & 1 deletion integration_tests/__tests__/json-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ test('JSON is available in the global scope', () => {
});

test('JSON.parse creates objects from within this context', () => {
expect(JSON.parse("{}").constructor).toBe(Object);
expect(JSON.parse('{}').constructor).toBe(Object);
});
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"babel-core": "^6.18.2",
"babel-eslint": "^7.1.1",
"babel-plugin-syntax-trailing-function-commas": "^6.13.0",
"babel-plugin-transform-async-to-generator": "^6.16.0",
"babel-plugin-transform-es2015-destructuring": "^6.19.0",
"babel-plugin-transform-es2015-parameters": "^6.18.0",
"babel-plugin-transform-flow-strip-types": "^6.18.0",
Expand Down
34 changes: 33 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,16 @@ babel-helper-call-delegate@^6.18.0:
babel-traverse "^6.18.0"
babel-types "^6.18.0"

babel-helper-function-name@^6.18.0:
version "6.18.0"
resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.18.0.tgz#68ec71aeba1f3e28b2a6f0730190b754a9bf30e6"
dependencies:
babel-helper-get-function-arity "^6.18.0"
babel-runtime "^6.0.0"
babel-template "^6.8.0"
babel-traverse "^6.18.0"
babel-types "^6.18.0"

babel-helper-get-function-arity@^6.18.0:
version "6.18.0"
resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.18.0.tgz#a5b19695fd3f9cdfc328398b47dafcd7094f9f24"
Expand All @@ -214,6 +224,16 @@ babel-helper-hoist-variables@^6.18.0:
babel-runtime "^6.0.0"
babel-types "^6.18.0"

babel-helper-remap-async-to-generator@^6.16.0:
version "6.18.0"
resolved "https://registry.yarnpkg.com/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.18.0.tgz#336cdf3cab650bb191b02fc16a3708e7be7f9ce5"
dependencies:
babel-helper-function-name "^6.18.0"
babel-runtime "^6.0.0"
babel-template "^6.16.0"
babel-traverse "^6.18.0"
babel-types "^6.18.0"

babel-helpers@^6.16.0:
version "6.16.0"
resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.16.0.tgz#1095ec10d99279460553e67eb3eee9973d3867e3"
Expand All @@ -227,6 +247,10 @@ babel-messages@^6.8.0:
dependencies:
babel-runtime "^6.0.0"

babel-plugin-syntax-async-functions@^6.8.0:
version "6.13.0"
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95"

babel-plugin-syntax-flow@^6.18.0:
version "6.18.0"
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz#4c3ab20a2af26aa20cd25995c398c4eb70310c8d"
Expand All @@ -235,6 +259,14 @@ babel-plugin-syntax-trailing-function-commas@^6.13.0:
version "6.13.0"
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.13.0.tgz#2b84b7d53dd744f94ff1fad7669406274b23f541"

babel-plugin-transform-async-to-generator@^6.16.0:
version "6.16.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.16.0.tgz#19ec36cb1486b59f9f468adfa42ce13908ca2999"
dependencies:
babel-helper-remap-async-to-generator "^6.16.0"
babel-plugin-syntax-async-functions "^6.8.0"
babel-runtime "^6.0.0"

babel-plugin-transform-es2015-destructuring@^6.19.0:
version "6.19.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.19.0.tgz#ff1d911c4b3f4cab621bd66702a869acd1900533"
Expand Down Expand Up @@ -278,7 +310,7 @@ babel-runtime@^6.0.0, babel-runtime@^6.11.6, babel-runtime@^6.9.0, babel-runtime
core-js "^2.4.0"
regenerator-runtime "^0.9.5"

babel-template@^6.16.0:
babel-template@^6.16.0, babel-template@^6.8.0:
version "6.16.0"
resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.16.0.tgz#e149dd1a9f03a35f817ddbc4d0481988e7ebc8ca"
dependencies:
Expand Down

0 comments on commit 41cd9dd

Please sign in to comment.