Skip to content

Commit

Permalink
test(w3c/headers-spec): normalize whispace in test
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoscaceres committed Jul 19, 2017
1 parent 50f770d commit 70e177f
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions tests/spec/w3c/headers-spec.js
Expand Up @@ -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 => {
Expand All @@ -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);
});
Expand Down

0 comments on commit 70e177f

Please sign in to comment.