Files
30-seconds-of-code/test/collectInto/collectInto.test.js
Angelos Chalaris a59af893bf Migrated tests to jest
Used jest-codemods to migrate, will have to pass everything by hand before we can merge.
2018-06-18 14:18:25 +03:00

14 lines
568 B
JavaScript

const expect = require('expect');
const collectInto = require('./collectInto.js');
test('Testing collectInto', () => {
//For more information on all the methods supported by tape
//Please go to https://github.com/substack/tape
expect(typeof collectInto === 'function').toBeTruthy();
const Pall = collectInto(Promise.all.bind(Promise));
let p1 = Promise.resolve(1);
let p2 = Promise.resolve(2);
let p3 = new Promise(resolve => setTimeout(resolve, 2000, 3));
Pall(p1, p2, p3).then(function(val){ expect(val).toEqual([1,2,3]);}, function(reason){});
});