diff options
Diffstat (limited to 'support/es.test.js')
-rw-r--r-- | support/es.test.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/support/es.test.js b/support/es.test.js new file mode 100644 index 0000000..9f7fd5e --- /dev/null +++ b/support/es.test.js @@ -0,0 +1,21 @@ +// simple async example to test ES module build output + +import {waterfall as waterfall} from "../build-es/index"; +import async from "../build-es/index"; +import constant from "../build-es/constant"; + +waterfall([ + constant(42), + function (val, next) { + async.setImmediate(function () { + next(null, val); + }); + } +], function (err, result) { + if (err) { throw err; } + console.log(result); + if (result !== 42) { + console.log("fail"); + process.exit(1); + } +}); |