-
Notifications
You must be signed in to change notification settings - Fork 660
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: error doesn't handle in the respond of the RequestMock (#7112)
* initial * update hammerhead * remove dev artifacts
- Loading branch information
1 parent
dad74b3
commit 549aed9
Showing
3 changed files
with
23 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
...tional/fixtures/api/es-next/request-hooks/testcafe-fixtures/request-mock/respond-error.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { RequestMock } from 'testcafe'; | ||
|
||
const mock = RequestMock() | ||
.onRequestTo('http://dummy-url.com/get') | ||
.respond(() => { | ||
throw new Error('Error in the "respond" method'); | ||
}); | ||
|
||
fixture `Fixture` | ||
.requestHooks(mock); | ||
|
||
test('test', async t => { | ||
await t.navigateTo('http://dummy-url.com/get'); | ||
}); |