From 8c4aa9a049e2ccae40fbf25a2a066665da5fae0e Mon Sep 17 00:00:00 2001 From: Chris Towles Date: Sun, 21 Aug 2022 00:40:11 -0400 Subject: [PATCH] fix(reporter-junit): choose different file name for escape XML test due to windows failed test --- test/reporters/tests/__snapshots__/reporters.spec.ts.snap | 6 +++--- test/reporters/tests/reporters.spec.ts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/reporters/tests/__snapshots__/reporters.spec.ts.snap b/test/reporters/tests/__snapshots__/reporters.spec.ts.snap index 120b8dae10d2..ae1db42bf395 100644 --- a/test/reporters/tests/__snapshots__/reporters.spec.ts.snap +++ b/test/reporters/tests/__snapshots__/reporters.spec.ts.snap @@ -236,12 +236,12 @@ AssertionError: expected 2.23606797749979 to equal 2 " `; -exports[`JUnit reporter with outputFile with XML in error details 1`] = ` -"JUNIT report written to /report.xml +exports[`JUnit reporter with outputFile with XML in error message 1`] = ` +"JUNIT report written to /report_escape_msg_xml.xml " `; -exports[`JUnit reporter with outputFile with XML in error details 2`] = ` +exports[`JUnit reporter with outputFile with XML in error message 2`] = ` " diff --git a/test/reporters/tests/reporters.spec.ts b/test/reporters/tests/reporters.spec.ts index c48960b1babf..cce738417f75 100644 --- a/test/reporters/tests/reporters.spec.ts +++ b/test/reporters/tests/reporters.spec.ts @@ -103,10 +103,10 @@ test('JUnit reporter with outputFile', async () => { rmSync(outputFile) }) -test('JUnit reporter with outputFile with XML in error details', async () => { +test('JUnit reporter with outputFile with XML in error message', async () => { // Arrange const reporter = new JUnitReporter() - const outputFile = resolve('report.xml') + const outputFile = resolve('report_escape_msg_xml.xml') const context = getContext() context.vitest.config.outputFile = outputFile