Skip to content

Commit

Permalink
fix: prevent unordered tests from conflicting (#1495)
Browse files Browse the repository at this point in the history
* fix: prevent unordered tests from conflicting

* link back

* 'unordered'
  • Loading branch information
saschanaz committed Feb 12, 2018
1 parent 23001a6 commit e9a7dbd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/spec/core/linter-rules/no-headingless-sections-spec.js
Expand Up @@ -11,6 +11,13 @@ describe("Core Linter Rule - 'no-headingless-sections'", () => {
});
});
const doc = document.implementation.createHTMLDocument("test doc");
beforeEach(() => {
// Make sure every unordered test get an empty document
// See: https://github.com/w3c/respec/pull/1495
while (doc.body.firstChild) {
doc.body.removeChild(doc.body.firstChild);
}
});
it("returns error when heading is missing section", async () => {
const section = doc.createElement("section");
doc.body.appendChild(section);
Expand Down

0 comments on commit e9a7dbd

Please sign in to comment.