@@ -3,7 +3,6 @@ import delay from 'delay';
3
3
import inRange from 'in-range' ;
4
4
import timeSpan from 'time-span' ;
5
5
import randomInt from 'random-int' ;
6
- import AggregateError from 'aggregate-error' ;
7
6
import pMap , { pMapSkip } from './index.js' ;
8
7
9
8
const sharedInput = [
@@ -143,8 +142,8 @@ test('immediately rejects when stopOnError is true', async t => {
143
142
144
143
test ( 'aggregate errors when stopOnError is false' , async t => {
145
144
await t . notThrowsAsync ( pMap ( sharedInput , mapper , { concurrency : 1 , stopOnError : false } ) ) ;
146
- await t . throwsAsync ( pMap ( errorInput1 , mapper , { concurrency : 1 , stopOnError : false } ) , { instanceOf : AggregateError , message : / f o o ( . | \n ) * b a r / } ) ;
147
- await t . throwsAsync ( pMap ( errorInput2 , mapper , { concurrency : 1 , stopOnError : false } ) , { instanceOf : AggregateError , message : / b a r ( . | \n ) * f o o / } ) ;
145
+ await t . throwsAsync ( pMap ( errorInput1 , mapper , { concurrency : 1 , stopOnError : false } ) , { instanceOf : AggregateError , message : '' } ) ;
146
+ await t . throwsAsync ( pMap ( errorInput2 , mapper , { concurrency : 1 , stopOnError : false } ) , { instanceOf : AggregateError , message : '' } ) ;
148
147
} ) ;
149
148
150
149
test ( 'pMapSkip' , async t => {
@@ -279,8 +278,8 @@ test('asyncIterator - immediately rejects when stopOnError is true', async t =>
279
278
280
279
test ( 'asyncIterator - aggregate errors when stopOnError is false' , async t => {
281
280
await t . notThrowsAsync ( pMap ( new AsyncTestData ( sharedInput ) , mapper , { concurrency : 1 , stopOnError : false } ) ) ;
282
- await t . throwsAsync ( pMap ( new AsyncTestData ( errorInput1 ) , mapper , { concurrency : 1 , stopOnError : false } ) , { instanceOf : AggregateError , message : / f o o ( . | \n ) * b a r / } ) ;
283
- await t . throwsAsync ( pMap ( new AsyncTestData ( errorInput2 ) , mapper , { concurrency : 1 , stopOnError : false } ) , { instanceOf : AggregateError , message : / b a r ( . | \n ) * f o o / } ) ;
281
+ await t . throwsAsync ( pMap ( new AsyncTestData ( errorInput1 ) , mapper , { concurrency : 1 , stopOnError : false } ) , { instanceOf : AggregateError , message : '' } ) ;
282
+ await t . throwsAsync ( pMap ( new AsyncTestData ( errorInput2 ) , mapper , { concurrency : 1 , stopOnError : false } ) , { instanceOf : AggregateError , message : '' } ) ;
284
283
} ) ;
285
284
286
285
test ( 'asyncIterator - pMapSkip' , async t => {
0 commit comments