map.js 286 B

12345678910111213
  1. import assert from 'assert';
  2. describe('map', () => {
  3. it('maps the results using the supplied callback', async () => {
  4. let list = [];
  5. await Observable.from([1, 2, 3])
  6. .map(x => x * 2)
  7. .forEach(x => list.push(x));
  8. assert.deepEqual(list, [2, 4, 6]);
  9. });
  10. });