Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

test: fix csharp har tests on Windows (#33556)

Max Schmitt0aa8da80351a
diff --git a/tests/library/inspector/cli-codegen-csharp.spec.ts b/tests/library/inspector/cli-codegen-csharp.spec.ts
index 865b916bef..ffa32ceaf5 100644
--- a/tests/library/inspector/cli-codegen-csharp.spec.ts
+++ b/tests/library/inspector/cli-codegen-csharp.spec.ts
@@ -201,7 +201,7 @@ for (const testFramework of ['nunit', 'mstest'] as const) {
test(`should work with --save-har in ${testFramework}`, async ({ runCLI }, testInfo) => {
const harFileName = testInfo.outputPath('har.har');
- const expectedResult = `await context.RouteFromHARAsync("${harFileName}");`;
+ const expectedResult = `await context.RouteFromHARAsync(${JSON.stringify(harFileName)});`;
const cli = runCLI([`--target=csharp-${testFramework}`, `--save-har=${harFileName}`], {
autoExitWhen: expectedResult,
});