Skip to content

Commit 8740a49

Browse files
committed
Tests: Allow running async/await in test files
We have previously not been able to use `async/await` in our test files. This can lead to particularly deep nesting or callback-passing when we are trying to sequence events for the purpose of the test. In this change we're adding the `babel-polyfill` to allow us to use those constructs and _linearize_ the async flows.
1 parent 2bce43a commit 8740a49

File tree

2 files changed

+45
-1
lines changed

2 files changed

+45
-1
lines changed

package-lock.json

Lines changed: 43 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,15 @@
1313
"scripts": {
1414
"flow": "flow",
1515
"test:coverage": "nyc npm test",
16-
"test": "mocha --reporter dot --require @babel/register test/**",
16+
"test": "mocha --reporter dot --require @babel/register --require babel-polyfill test/**",
1717
"babel": "babel -q -d lib/ src/",
1818
"lint": "eslint --quiet src/",
1919
"prepare": "npm run babel"
2020
},
2121
"author": "",
2222
"license": "BSD-2-Clause",
2323
"dependencies": {
24+
"babel-polyfill": "^6.26.0",
2425
"uuid": "3.3.3",
2526
"websocket": "1.0.30"
2627
},

0 commit comments

Comments
 (0)