After we upgraded to QUnit 1.23.1, we gained support for
assert.expect(). This allows us to guard against any race conditions
within tests, because now expect() will be linked to the specific test
instead of the current running test.
This was required for us to get assert.async() support within tests, as
well as assert.expect() support. This was required because we need them
for multiple async tests that are coming.
There were a few undefined variables being referenced within the
Select2 code. The JSHint configuration has been modified to fail
if there are undefined variables being referenced, including any
global variables.
There is an exception that is being made for the jQuery shim, as it
must try to find the global jQuery references.
An exception is made for the test helpers, as the SauceLabs reporting
variables are not camelCase, and would normally trigger warnings.
This closes https://github.com/select2/select2/pull/3028.