Skip to content

Commit bf251d7

Browse files
committed
Support testing in node 6.
- Use babel on the test code itself.
1 parent 08fd30f commit bf251d7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/test.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@
2020
*
2121
* Copyright (c) 2011-2017 Digital Bazaar, Inc. All rights reserved.
2222
*/
23+
24+
// support async/await tests in node6
25+
if(!require('semver').gte(process.version, '8.6.0')) {
26+
require('babel-register')({
27+
presets: ['node6-es6']
28+
});
29+
}
30+
2331
const assert = require('chai').assert;
2432
const common = require('./test-common');
2533
const fs = require('fs-extra');

0 commit comments

Comments
 (0)