Files
30-seconds-of-code/test/delay/delay.test.js
2018-02-16 14:00:23 +02:00

21 lines
596 B
JavaScript

const test = require('tape');
const delay = require('./delay.js');
test('Testing delay', (t) => {
//For more information on all the methods supported by tape
//Please go to https://github.com/substack/tape
t.true(typeof delay === 'function', 'delay is a Function');
delay(
function(text) {
t.equals(text, 'test', 'Works as expecting, passing arguments properly');
},
1000,
'test'
);
//t.deepEqual(delay(args..), 'Expected');
//t.equal(delay(args..), 'Expected');
//t.false(delay(args..), 'Expected');
//t.throws(delay(args..), 'Expected');
t.end();
});