diff options
Diffstat (limited to 'test/nextTick.js')
-rw-r--r-- | test/nextTick.js | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/test/nextTick.js b/test/nextTick.js index e590d94..71af1a0 100644 --- a/test/nextTick.js +++ b/test/nextTick.js @@ -1,31 +1,31 @@ var async = require('../lib'); var expect = require('chai').expect; -describe("nextTick", function () { +describe("nextTick", () => { - it('basics', function(done){ + it('basics', (done) => { var call_order = []; - async.nextTick(function(){call_order.push('two');}); + async.nextTick(() => {call_order.push('two');}); call_order.push('one'); - setTimeout(function(){ + setTimeout(() => { expect(call_order).to.eql(['one','two']); done(); }, 50); }); - it('nextTick in the browser @nodeonly', function(done){ + it('nextTick in the browser @nodeonly', (done) => { var call_order = []; - async.nextTick(function(){call_order.push('two');}); + async.nextTick(() => {call_order.push('two');}); call_order.push('one'); - setTimeout(function(){ + setTimeout(() => { expect(call_order).to.eql(['one','two']); done(); }, 50); }); - it("extra args", function (done) { - async.nextTick(function (a, b, c) { + it("extra args", (done) => { + async.nextTick((a, b, c) => { expect([a, b, c]).to.eql([1, 2, 3]); done(); }, 1, 2, 3); |