-
Notifications
You must be signed in to change notification settings - Fork 959
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
27 additions
and
52 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,13 @@ | ||
const request = require("@playwright/test").request; | ||
|
||
module.exports = async () => { | ||
const context = await request.newContext({ baseURL: "http://localhost:4000" }); | ||
await context.post("/export-coverage") | ||
try { | ||
const context = await request.newContext({ baseURL: "http://localhost:4000" }); | ||
// gracefully stops the e2e script to export coverage | ||
await context.post("/halt") | ||
} catch (e) { | ||
// we expect the request to fail because the request | ||
// actually stops the server | ||
return | ||
} | ||
}; |
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