Replace Deprecated Assertions

This commit is contained in:
Josh Johnson 2020-07-06 21:51:57 -04:00 committed by GitHub
parent 5f3610ecfd
commit f9265375aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -129,7 +129,7 @@ function testFormatter(xmlFormatter: XmlFormatter, options: XmlFormattingOptions
const actualFormattedXml = xmlFormatter.formatXml(unformattedXml, options).replace(/\r/, ""); const actualFormattedXml = xmlFormatter.formatXml(unformattedXml, options).replace(/\r/, "");
assert.equal(actualFormattedXml, expectedFormattedXml, "Actual formatted XML does not match expected formatted XML."); assert.ok((actualFormattedXml === expectedFormattedXml), `Actual formatted XML does not match expected formatted XML.\n\nACTUAL\n${actualFormattedXml}\n\nEXPECTED\n${expectedFormattedXml}`);
} }
function testMinifier(xmlFormatter: XmlFormatter, options: XmlFormattingOptions, fileLabel: string): void { function testMinifier(xmlFormatter: XmlFormatter, options: XmlFormattingOptions, fileLabel: string): void {
@ -138,5 +138,5 @@ function testMinifier(xmlFormatter: XmlFormatter, options: XmlFormattingOptions,
const actualMinifiedXml = xmlFormatter.minifyXml(unminifiedXml, options).replace(/\r/, ""); const actualMinifiedXml = xmlFormatter.minifyXml(unminifiedXml, options).replace(/\r/, "");
assert.equal(actualMinifiedXml, expectedMinifiedXml, "Actual minified XML does not match expected minified XML."); assert.ok((actualMinifiedXml === expectedMinifiedXml), `Actual minified XML does not match expected minified XML.\n\nACTUAL\n${actualMinifiedXml}\n\nEXPECTED\n${expectedMinifiedXml}`);
} }