File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
packages/core/src/test/notifications Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -535,7 +535,9 @@ describe('RemoteFetcher', function () {
535535 httpStub . throws ( new Error ( 'network error' ) )
536536
537537 // Start function under test
538- const fetcher = new RemoteFetcher ( ) . fetch ( 'startUp' , 'any' ) . then ( ( ) => assert . fail ( 'Did not throw exception.' ) )
538+ const fetcher = assert . rejects ( new RemoteFetcher ( ) . fetch ( 'startUp' , 'any' ) , ( e ) => {
539+ return e instanceof Error && e . message === 'last error'
540+ } )
539541
540542 // Progresses the clock, allowing the fetcher logic to break out of sleep for each iteration of withRetries()
541543 assert . strictEqual ( httpStub . callCount , 1 ) // 0
@@ -550,9 +552,7 @@ describe('RemoteFetcher', function () {
550552 assert . strictEqual ( httpStub . callCount , 5 ) // 150_000
551553
552554 // We hit timeout so the last error will be thrown
553- await assert . rejects ( fetcher , ( e ) => {
554- return e instanceof Error && e . message === 'last error'
555- } )
555+ await fetcher
556556 } )
557557} )
558558
You can’t perform that action at this time.
0 commit comments