Migrated tests to jest

Used jest-codemods to migrate, will have to pass everything by hand before we can merge.
This commit is contained in:
Angelos Chalaris
2018-06-18 14:18:25 +03:00
parent ae8cd7ee50
commit 5afe81452a
890 changed files with 6950 additions and 6921 deletions

View File

@ -1,24 +0,0 @@
const test = require('tape');
const isPrimitive = require('./isPrimitive.js');
test('Testing isPrimitive', (t) => {
//For more information on all the methods supported by tape
//Please go to https://github.com/substack/tape
t.true(typeof isPrimitive === 'function', 'isPrimitive is a Function');
t.true(isPrimitive(null), "isPrimitive(null) is primitive");
t.true(isPrimitive(undefined), "isPrimitive(undefined) is primitive");
t.true(isPrimitive('string'), "isPrimitive(string) is primitive");
t.true(isPrimitive(true), "isPrimitive(true) is primitive");
t.true(isPrimitive(50), "isPrimitive(50) is primitive");
t.true(isPrimitive('Hello'), "isPrimitive('Hello') is primitive");
t.true(isPrimitive(false), "isPrimitive(false) is primitive");
t.true(isPrimitive(Symbol()), "isPrimitive(Symbol()) is primitive");
t.false(isPrimitive([1, 2, 3]), "isPrimitive([1, 2, 3]) is not primitive");
t.false(isPrimitive({ a: 123 }), "isPrimitive({ a: 123 }) is not primitive");
let start = new Date().getTime();
isPrimitive({ a: 123 });
let end = new Date().getTime();
t.true((end - start) < 2000, 'isPrimitive({ a: 123 }) takes less than 2s to run');
t.end();
});