summaryrefslogtreecommitdiff
path: root/test/apply.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/apply.js')
-rw-r--r--test/apply.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/apply.js b/test/apply.js
index 18e5d12..8c32177 100644
--- a/test/apply.js
+++ b/test/apply.js
@@ -1,10 +1,10 @@
var async = require('../lib');
var expect = require('chai').expect;
-describe('concat', function() {
- it('apply', function(done) {
- var fn = function(){
- expect(Array.prototype.slice.call(arguments)).to.eql([1,2,3,4]);
+describe('concat', () => {
+ it('apply', (done) => {
+ var fn = function (...args) {
+ expect(args).to.eql([1,2,3,4]);
};
async.apply(fn, 1, 2, 3, 4)();
async.apply(fn, 1, 2, 3)(4);
@@ -12,7 +12,7 @@ describe('concat', function() {
async.apply(fn, 1)(2, 3, 4);
async.apply(fn)(1, 2, 3, 4);
expect(
- async.apply(function(name){return 'hello ' + name;}, 'world')()
+ async.apply((name) => {return 'hello ' + name;}, 'world')()
).to.equal(
'hello world'
);