Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: prevent unordered tests from conflicting #1495

Merged
merged 3 commits into from Feb 12, 2018
Merged

Conversation

saschanaz
Copy link
Member

@saschanaz saschanaz commented Feb 10, 2018

jasmine-core 3.0 defaults to running in unordered way and this causes failure on no-headingless-sections tests:

  Core Linter Rule - 'no-headingless-sections'
    √ complains when a nested section doesn't have a heading
    × returns error when heading is missing section
    √ doesn't complain when sections do have a heading
  Core Linter Rule - 'no-headingless-sections'
    √ returns error when heading is missing section
    √ doesn't complain when sections do have a heading
    √ complains when a nested section doesn't have a heading

This PR clears doc before each test to prevent this failure.

@@ -11,6 +11,11 @@ describe("Core Linter Rule - 'no-headingless-sections'", () => {
});
});
const doc = document.implementation.createHTMLDocument("test doc");
beforeEach(() => {
while (doc.body.firstChild) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: maybe leave a comment with a link back to this PR? The code on its own doesn’t really explain itself.

@saschanaz
Copy link
Member Author

👍 I added one, is it good enough?

@saschanaz saschanaz merged commit e9a7dbd into develop Feb 12, 2018
@saschanaz saschanaz deleted the test-unordered branch February 12, 2018 04:07
marcoscaceres added a commit that referenced this pull request Feb 12, 2018
* develop:
  v19.2.0
  docs(examples): use github config option (#1500)
  fix(tools/release): use build:components instead (#1501)
  fix: ping SpecRef in ordering-safe way  (#1499)
  chore: update dependencies (#1498)
  fix: prevent unordered tests from conflicting (#1495)
  refactor: remove WebIDL array support  (#1496)
  Feat: link to pull requests in headers
  Skip detectBrowsers when explicitly passing browsers (#1490)
  refactor: use node.js api rather than unix commands  (#1488)
  refactor: use puppeteer instead of nightmare (#1483)
  chore(package): update jasmine-core to version 3.0.0 (#1481)
  workaround: use sudo required on travis (#1478)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants