Skip to content

Commit becf8ce

Browse files
committed
add async/await
1 parent 72a2539 commit becf8ce

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

lib/recast.json

+6
Original file line numberDiff line numberDiff line change
@@ -106,5 +106,11 @@
106106
{
107107
"module": "regexpu",
108108
"shortName": "rgxu"
109+
},
110+
{
111+
"module": "es7-async-fn",
112+
"shortName": "async",
113+
"runtime": "es7-async-fn/runtime.js",
114+
"sources": []
109115
}
110116
]

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"es6-rest-params": "0",
3131
"es6-spread": "0",
3232
"es6-templates": "0",
33+
"es7-async-fn": "1",
3334
"istanbul": "0",
3435
"mocha": "2",
3536
"postcss": "3",

test/index.js

+8
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,14 @@ describe('Recast', function () {
160160
new Function(runtime)
161161
})
162162
})
163+
164+
describe('Async Functions', function () {
165+
it('.runtime', function () {
166+
var asyncFn = db.recast.transform.async
167+
var runtime = asyncFn.runtime
168+
new Function(runtime)
169+
})
170+
})
163171
})
164172

165173
describe('PostCSS', function () {

0 commit comments

Comments
 (0)