File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,9 +4,9 @@ import { sleep } from "./sleep";
44
55describe ( "seriesAsync" , ( ) => {
66 test ( "invalid arg" , ( ) => {
7- expect ( seriesAsync ( [ Promise . resolve ( 10 ) ] as any ) ) . rejects . toThrowError ( ) ;
8- expect ( seriesAsync ( [ new Promise ( ( ) => { } ) ] as any ) ) . rejects . toThrowError ( ) ;
9- expect ( seriesAsync ( [ sleep ( 1 ) ] as any ) ) . rejects . toThrowError ( ) ;
7+ expect ( seriesAsync ( [ Promise . resolve ( 10 ) ] as any ) ) . rejects . toThrow ( ) ;
8+ expect ( seriesAsync ( [ new Promise ( ( ) => { } ) ] as any ) ) . rejects . toThrow ( ) ;
9+ expect ( seriesAsync ( [ sleep ( 1 ) ] as any ) ) . rejects . toThrow ( ) ;
1010 } ) ;
1111
1212 test ( "simple" , async ( ) => {
@@ -34,14 +34,14 @@ describe("seriesAsync", () => {
3434 expect (
3535 seriesAsync ( [
3636 async ( ) => {
37- await sleep ( 1 ) ; // make sure it throws before the next function anywway
37+ await sleep ( 1 ) ; // make sure it throws before the next function anyway
3838 throw new Error ( "1" ) ;
3939 } ,
4040 ( ) => {
4141 throw new Error ( "2" ) ;
4242 } ,
4343 ] )
44- ) . rejects . toThrowError ( "1" ) ;
44+ ) . rejects . toThrow ( "1" ) ;
4545 } ) ;
4646
4747 test ( "Promise.reject" , ( ) => {
You can’t perform that action at this time.
0 commit comments