diff options
author | Alex Early <alexander.early@gmail.com> | 2018-07-08 16:58:36 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-08 16:58:36 -0700 |
commit | e4751178540a3c6e64598b93977481ec599704d2 (patch) | |
tree | dce5731bdb1076971d2e4a0a42fbe0d95c720185 /support/build.test.js | |
parent | 6405b109fe60541ff42d7638ac891d321d6a7bb3 (diff) | |
download | async-e4751178540a3c6e64598b93977481ec599704d2.tar.gz |
ES6-ify codebase (#1553)
* cancelable foreach
* cancelable waterfall
* cancellable auto
* fix lint
* fix tests
* cancelable whilst/until/during/forever
* fix waterfall test. It WILL get there
* docs
* use rest params instead of slice
* clean up internals
* remove property func
* clarify uses of createTester
* happy path async funtions in asyncify
* stop using arguments
* DLL to class
* moar arrows
* fix merge issues
* remove forOwn
* moar arrows
* fix merge mistake
* even more arrows, what can stop him
* mo more fn.apply(null,...)
* remove more spurious uses of apply
* update lint config
* just when you thought there couldn't possibly be more arrows
* use eslint:recommended
* even less uses or aguments
* get rid of prototype cuteness
* fix concat tests
* fix more tests
Diffstat (limited to 'support/build.test.js')
-rw-r--r-- | support/build.test.js | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/support/build.test.js b/support/build.test.js index ebf18b7..178c623 100644 --- a/support/build.test.js +++ b/support/build.test.js @@ -6,79 +6,79 @@ var rollupPluginNodeResolve = require('rollup-plugin-node-resolve'); var fs = require('fs'); var exec = require('child_process').exec; -describe("async main", function() { +describe("async main", () => { var async; - before(function() { + before(() => { async = require("../build/"); }); - it("should have methods", function() { - methods.forEach(function(methodName) { + it("should have methods", () => { + methods.forEach((methodName) => { expect(async[methodName]).to.be.a("function"); }); }); }); -describe("async umd", function() { +describe("async umd", () => { var async; - before(function() { + before(() => { async = require("../build/dist/async.js"); }); - it("should have methods", function() { - methods.forEach(function(methodName) { + it("should have methods", () => { + methods.forEach((methodName) => { expect(async[methodName]).to.be.a("function"); }); }); }); -describe("async umd minified", function() { +describe("async umd minified", () => { var async; - before(function() { + before(() => { async = require("../build/dist/async.min.js"); }); - it("should have methods", function() { - methods.forEach(function(methodName) { + it("should have methods", () => { + methods.forEach((methodName) => { expect(async[methodName]).to.be.a("function"); }); }); }); -methods.forEach(function (methodName) { - describe("async." + methodName, function () { +methods.forEach((methodName) => { + describe("async." + methodName, () => { var method; - before(function () { + before(() => { method = require("../build/" + methodName); }); - it("should require the individual method", function() { + it("should require the individual method", () => { expect(method).to.be.a("function"); }); }); }); -describe("ES Modules", function () { +describe("ES Modules", () => { var tmpDir = __dirname + "/../tmp"; var buildFile = __dirname + "/../tmp/es.test.js"; - before(function (done) { + before((done) => { if (fs.existsSync(tmpDir)) { return done(); } fs.mkdir(tmpDir, done); }); - before(function () { + before(() => { return rollup({ entry: __dirname + "/es.test.js", plugins: [ rollupPluginNodeResolve() ] - }).then(function (bundle) { + }).then((bundle) => { return bundle.write({ format: "umd", dest: buildFile @@ -86,8 +86,8 @@ describe("ES Modules", function () { }); }); - it("should build a successful bundle", function (done) { - exec("node " + buildFile, function (err, stdout) { + it("should build a successful bundle", (done) => { + exec("node " + buildFile, (err, stdout) => { if (err) { return done(err); } expect(stdout).to.match(/42/); done(); |