● promisesInSeries › должна вызывать функции в правильной последовательности
expect(received).toStrictEqual(expected) // deep equality
- Expected
+ Received
Array [
+ Array [
+ 5,
+ ],
+ Array [
+ 5,
+ 7,
+ ],
+ Array [
+ 5,
+ 7,
+ 9,
+ ],
+ Array [
5,
7,
9,
12,
+ ],
+ Array [
+ 5,
+ 7,
+ 9,
+ 12,
3,
+ ],
+ Array [
+ 5,
+ 7,
+ 9,
+ 12,
+ 3,
4,
+ ],
]
37 | ]);
38 | expect(result).toBeInstanceOf(Promise);
> 39 | expect(await result).toStrictEqual([5, 7, 9, 12, 3, 4]);
| ^
40 | expect(log).toStrictEqual([5, 7, 9, 12, 3, 4]);
41 | expect(logParams).toStrictEqual([
42 | [],
at Object.toStrictEqual test.js:39:26)
async function processArray(array) {
const promises = await Promise.all(
array.map((elem) => {
return elem()
})
);
return promises
}