chore: enable playwright test extension in vscode (#13135)

* chore: enable playwright test extension in vscode

This enables using the vscode debugger in playwright tests
This commit is contained in:
Steven Masley
2024-05-02 23:14:24 +00:00
committed by GitHub
parent 699e187d55
commit 7779c0a1dc
2 changed files with 17 additions and 1 deletions
+9
View File
@@ -41,6 +41,15 @@ pnpm build
pnpm playwright:test
```
To run the playwright debugger from VSCode, just launch VSCode from the nix
environment and have the extension installed.
```shell
# Optionally add '--command zsh' to choose your shell.
nix develop
code .
```
# Enterprise tests
Enterprise tests require a license key to run.
+8 -1
View File
@@ -133,7 +133,14 @@ class CoderReporter implements Reporter {
}
}
const logLines = (chunk: string): string[] => chunk.trimEnd().split("\n");
const logLines = (chunk: string | Buffer): string[] => {
if (chunk instanceof Buffer) {
// When running in a debugger, the input to this is a Buffer instead of a string.
// Unsure why, but this prevents the `trimEnd` from throwing an error.
return [chunk.toString()];
}
return chunk.trimEnd().split("\n");
};
const exportDebugPprof = async (outputFile: string) => {
const response = await axiosInstance.get(