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

New rule: Forbid QUnit 1.x syntax #20

Closed
12 tasks done
platinumazure opened this issue Jan 15, 2016 · 1 comment
Closed
12 tasks done

New rule: Forbid QUnit 1.x syntax #20

platinumazure opened this issue Jan 15, 2016 · 1 comment
Assignees
Milestone

Comments

@platinumazure
Copy link
Owner

platinumazure commented Jan 15, 2016

Per the migration guide, this implies a few warnings (which may or may not be separate rules):

  • Forbid use of module, test, and asyncTest globals
  • Forbid use of QUnit.asyncTest
  • Forbid global stop()/start()
  • Require assert.async() instead of QUnit.stop()
  • Forbid use of assertion globals
  • Forbid use of global expect()
  • Require beforeEach and afterEach module hooks instead of setup and teardown
  • Forbid QUnit.push (use this.push in custom assertion)
  • Forbid QUnit.init
  • Forbid QUnit.reset
  • Forbid assignments to QUnit.log and other logging callbacks
  • Forbid QUnit.jsDump, favoring QUnit.dump instead
@platinumazure platinumazure modified the milestone: 0.4.0 Jan 19, 2016
platinumazure added a commit that referenced this issue Apr 10, 2016
@platinumazure platinumazure modified the milestone: 0.9.0 Apr 10, 2016
platinumazure added a commit that referenced this issue Apr 10, 2016
@platinumazure platinumazure self-assigned this Apr 23, 2016
platinumazure added a commit that referenced this issue Apr 23, 2016
@platinumazure
Copy link
Owner Author

Unfortunately we don't have a way of intelligently distinguishing between QUnit.start() for starting the test runner and QUnit.start() for decrementing the async semaphore. We want to flag the latter but not the former.

Hopefully it should be sufficient to flag asyncTest/QUnit.stop and nudge users to use assert.async; the documentation for assert.async should in turn inform users on the correct way to use the new async callback mechanism.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant