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 63ec2596cf
commit a59af893bf
890 changed files with 6950 additions and 6921 deletions

View File

@ -1,19 +0,0 @@
const test = require('tape');
const zipObject = require('./zipObject.js');
test('Testing zipObject', (t) => {
//For more information on all the methods supported by tape
//Please go to https://github.com/substack/tape
t.true(typeof zipObject === 'function', 'zipObject is a Function');
t.deepEqual(zipObject(['a', 'b', 'c'], [1, 2]), {a: 1, b: 2, c: undefined}, 'zipObject([a, b, c], [1, 2]) returns {a: 1, b: 2, c: undefined}');
t.deepEqual(zipObject(['a', 'b'], [1, 2, 3]), {a: 1, b: 2}, 'zipObject([a, b], [1, 2, 3]) returns {a: 1, b: 2}');
t.deepEqual(zipObject(['a', 'b', 'c'], 'string'), { a: 's', b: 't', c: 'r' }, 'zipObject([a, b, c], string) returns { a: s, b: t, c: r }');
t.deepEqual(zipObject(['a'], 'string'), { a: 's' }, 'zipObject([a], string) returns { a: s }');
t.throws(() => zipObject(), 'zipObject() throws an error');
t.throws(() => zipObject(['string'], null), 'zipObject([string], null) throws an error');
t.throws(() => zipObject(null, [1]), 'zipObject(null, [1]) throws an error');
t.throws(() => zipObject('string'), 'zipObject(string) throws an error');
t.throws(() => zipObject('test', 'string'), 'zipObject(test, string) throws an error');
t.end();
});