diff --git a/tests/spec/w3c/headers-spec.js b/tests/spec/w3c/headers-spec.js index 1b72747279..2d5d2ff970 100644 --- a/tests/spec/w3c/headers-spec.js +++ b/tests/spec/w3c/headers-spec.js @@ -910,9 +910,15 @@ describe("W3C — Headers", function() { }; Object.assign(ops.config, newProps); makeRSDoc(ops, doc => { - const aElem = doc.querySelector(`a[href^="http://www.w3.org/2003/03/Translations/"]`); + const aElem = doc.querySelector( + `a[href^="http://www.w3.org/2003/03/Translations/"]` + ); expect(aElem.href.endsWith("PASS")).toBeTruthy(); - expect(aElem.parentElement.textContent.trim()).toEqual("See also translations."); + const textContent = aElem.parentElement.textContent + .trim() + .replace("\n", "") + .replace(/\s+/g, " "); + expect().toEqual("See also translations."); }).then(done); }); it("doesn't include a translation link when it's not REC", done => { @@ -923,7 +929,9 @@ describe("W3C — Headers", function() { }; Object.assign(ops.config, newProps); makeRSDoc(ops, doc => { - const aElem = doc.querySelector(`a[href^="http://www.w3.org/2003/03/Translations/"]`); + const aElem = doc.querySelector( + `a[href^="http://www.w3.org/2003/03/Translations/"]` + ); expect(aElem).toEqual(null); }).then(done); });