diff --git a/src/test/extension.test.ts b/src/test/extension.test.ts index e99abab..8734e63 100644 --- a/src/test/extension.test.ts +++ b/src/test/extension.test.ts @@ -130,7 +130,7 @@ function testFormatter(xmlFormatter: XmlFormatter, options: XmlFormattingOptions const actualFormattedXml = xmlFormatter.formatXml(unformattedXml, options).replace(/\r/, "").trim(); // tslint:disable-next-line - assert.ok((actualFormattedXml === expectedFormattedXml), `Actual formatted XML does not match expected formatted XML.\n\nACTUAL\n${actualFormattedXml}\n\nEXPECTED\n${expectedFormattedXml}`); + assert.ok((actualFormattedXml === expectedFormattedXml), `Actual formatted XML does not match expected formatted XML.\n\nACTUAL\n${actualFormattedXml.replace(/\n/, "~n").replace(" ", "~s")}\n\nEXPECTED\n${expectedFormattedXml.replace(/\n/, "~n").replace(" ", "~s")}`); } function testMinifier(xmlFormatter: XmlFormatter, options: XmlFormattingOptions, fileLabel: string): void { @@ -140,5 +140,5 @@ function testMinifier(xmlFormatter: XmlFormatter, options: XmlFormattingOptions, const actualMinifiedXml = xmlFormatter.minifyXml(unminifiedXml, options).replace(/\r/, "").trim(); // tslint:disable-next-line - assert.ok((actualMinifiedXml === expectedMinifiedXml), `Actual minified XML does not match expected minified XML.\n\nACTUAL\n${actualMinifiedXml}\n\nEXPECTED\n${expectedMinifiedXml}`); + assert.ok((actualMinifiedXml === expectedMinifiedXml), `Actual minified XML does not match expected minified XML.\n\nACTUAL\n${actualMinifiedXml.replace(/\n/, "~n").replace(" ", "~s")}\n\nEXPECTED\n${expectedMinifiedXml.replace(/\n/, "~n").replace(" ", "~s")}`); }