From 481de663ac2db8dda7e23720dea3a387a07a61c0 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Sat, 13 Apr 2024 11:44:24 -0700 Subject: [PATCH] Make tests pass on Windows --- tests/playwright-test/test-step.spec.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/playwright-test/test-step.spec.ts b/tests/playwright-test/test-step.spec.ts index 84e756d5d0..6fceeab51f 100644 --- a/tests/playwright-test/test-step.spec.ts +++ b/tests/playwright-test/test-step.spec.ts @@ -36,9 +36,9 @@ function formatStack(indent, stack) { stack = stack.split('\\n').filter(s => s.startsWith(' at ')); stack = stack.map(s => { const match = /^( at.* )\\(?([^ )]+)\\)?/.exec(s); - const location = match[2].split(':'); - location[0] = path.basename(location[0]); - return ' at ' + location.join(':'); + let location = match[2]; + location = location.substring(location.lastIndexOf(path.sep) + 1); + return ' at ' + location; }); return indent + stack.join('\\n' + indent); }