Make WordPress Core

Opened 12 years ago

Closed 11 years ago

#30824 closed enhancement (fixed)

Upgrade QUnit

Reported by: jorbin Owned by:
Priority: normal Milestone: 4.3
Component: Build/Test Tools Version:
Severity: normal Keywords:
Cc: Focuses:

Description

Since adopting QUnit as our unit testing framework for JavaScript, there have been four releases. We haven't updated any of them.

The biggest change is that they have started setting up for a 2.0 release that will require us to make some changes to how our tests are written.

Some of the other changes that will be nice to have now are:

QUnit asynchronous tests can also now be defined using the new var done = assert.async() method instead of the old stop()/start(), making them specific to the test block.

QUnit.skip: This method can be used to define tests that aren’t executed, as placeholders or to temporarily disable an existing test (instead of commenting it out). The skipped test is still displayed in the HTML reporter, marked prominently as “SKIPPED”.

There also has been a lot of work done to make it easier to run tests with runners such as karma that we could use to automate running our tests in real browsers.

Attachments (1)

30824.diff (161.7 KB ) - added by jorbin 11 years ago.

Download all attachments as: .zip

Change History (4)

#1 @jorbin
11 years ago

  • Milestone Awaiting Review4.3
  • Summary Upgrade to QUnit 1.16Upgrade QUnit

@jorbin
11 years ago

#2 @jorbin
11 years ago

In 32343:

Update QUnit to v1.18.0

See https://github.com/jquery/qunit/blob/1.18.0/History.md for changes from 1.12.0 to now. Mostly bug fixes and internal changes in preparation for QUnit v2.

See #30824

#3 @jorbin
11 years ago

  • Resolutionfixed
  • Status newclosed

The TinyMCE tests are still using a seperate QUnit, version 1.14.0, which is inline with what tinyMCE is using upstream at https://github.com/tinymce/tinymce/blob/master/tests/js/qunit/qunit.js . I don't think we should change that until they change.

Note: See TracTickets for help on using tickets.