mirror of
https://github.com/CamHenlin/MessagesForMacintosh.git
synced 2025-02-18 05:30:26 +00:00
14 lines
286 B
JavaScript
14 lines
286 B
JavaScript
|
import assert from 'assert';
|
||
|
|
||
|
describe('map', () => {
|
||
|
it('maps the results using the supplied callback', async () => {
|
||
|
let list = [];
|
||
|
|
||
|
await Observable.from([1, 2, 3])
|
||
|
.map(x => x * 2)
|
||
|
.forEach(x => list.push(x));
|
||
|
|
||
|
assert.deepEqual(list, [2, 4, 6]);
|
||
|
});
|
||
|
});
|