diff --git a/tests/playwright-test/plugins.spec.ts b/tests/playwright-test/plugins.spec.ts index 2df73c104e..1ccee77738 100644 --- a/tests/playwright-test/plugins.spec.ts +++ b/tests/playwright-test/plugins.spec.ts @@ -22,7 +22,7 @@ test('event order', async ({ runInlineTest, legacyConfigLoader }, testInfo) => { const result = await runInlineTest({ 'log.ts': ` import { appendFileSync } from 'fs'; - const log = (...args) => appendFileSync('${log}', args.join(' ') + '\\n'); + const log = (...args) => appendFileSync('${log.replace(/\\/g, '\\\\')}', args.join(' ') + '\\n'); export default log; `, 'test.spec.ts': `