Test migration to jest by hand
Apparently using regular expressions is way easier.
This commit is contained in:
7
test/timeTaken/timeTaken.js
Normal file
7
test/timeTaken/timeTaken.js
Normal file
@ -0,0 +1,7 @@
|
||||
const timeTaken = callback => {
|
||||
console.time('timeTaken');
|
||||
const r = callback();
|
||||
console.timeEnd('timeTaken');
|
||||
return r;
|
||||
};
|
||||
module.exports = timeTaken;
|
||||
10
test/timeTaken/timeTaken.test.js
Normal file
10
test/timeTaken/timeTaken.test.js
Normal file
@ -0,0 +1,10 @@
|
||||
const expect = require('expect');
|
||||
const timeTaken = require('./timeTaken.js');
|
||||
|
||||
|
||||
test('timeTaken is a Function', () => {
|
||||
expect(timeTaken).toBeInstanceOf(Function);
|
||||
});
|
||||
t.pass('Tested by @chalarangelo on 16/02/2018');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user