Test migration to jest by hand
Apparently using regular expressions is way easier.
This commit is contained in:
3
test/getType/getType.js
Normal file
3
test/getType/getType.js
Normal file
@ -0,0 +1,3 @@
|
||||
const getType = v =>
|
||||
v === undefined ? 'undefined' : v === null ? 'null' : v.constructor.name.toLowerCase();
|
||||
module.exports = getType;
|
||||
9
test/getType/getType.test.js
Normal file
9
test/getType/getType.test.js
Normal file
@ -0,0 +1,9 @@
|
||||
const expect = require('expect');
|
||||
const getType = require('./getType.js');
|
||||
|
||||
|
||||
test('getType is a Function', () => {
|
||||
expect(getType).toBeInstanceOf(Function);
|
||||
});
|
||||
t.equal(getType(new Set([1, 2, 3])), 'set', "Returns the native type of a value");
|
||||
|
||||
Reference in New Issue
Block a user