.done( function () {
assert.strictEqual( isAwesomeDone, true, 'test.promise module should\'ve caused isAwesomeDone to be true' );
delete mw.loader.testCallback;
-
} )
.fail( function () {
assert.ok( false, 'Error callback fired while loader.using "test.promise" module' );
} );
QUnit.test( '.using() Error: Circular dependency', function ( assert ) {
+ var done = assert.async();
+
mw.loader.register( [
[ 'test.circle1', '0', [ 'test.circle2' ] ],
[ 'test.circle2', '0', [ 'test.circle3' ] ],
function fail( e ) {
assert.ok( /Circular/.test( String( e ) ), 'Detect circular dependency' );
}
- );
+ )
+ .always( done );
} );
QUnit.test( '.load() - Error: Circular dependency', function ( assert ) {
} );
QUnit.test( '.using() - Error: Unregistered', function ( assert ) {
+ var done = assert.async();
+
mw.loader.using( 'test.using.unreg' ).then(
function done() {
assert.ok( false, 'Unexpected resolution, expected error.' );
function fail( e ) {
assert.ok( /Unknown/.test( String( e ) ), 'Detect unknown dependency' );
}
- );
+ ).always( done );
} );
QUnit.test( '.load() - Error: Unregistered (ignored)', 0, function ( assert ) {
url: {
print: [ urlStyleTest( '.mw-test-implement-b1', 'text-align', 'center' ) ],
screen: [
- // bug 40834: Make sure it actually works with more than 1 stylesheet reference
+ // T42834: Make sure it actually works with more than 1 stylesheet reference
urlStyleTest( '.mw-test-implement-b2', 'float', 'left' ),
urlStyleTest( '.mw-test-implement-b3', 'float', 'right' )
]
'test.implement.d',
function () {
assertStyleAsync( assert, $element, 'float', 'right', function () {
- assert.notEqual( $element2.css( 'text-align' ), 'center', 'print style is not applied (bug 40500)' );
+ assert.notEqual( $element2.css( 'text-align' ), 'center', 'print style is not applied (T42500)' );
done();
} );
},
mw.loader.load( 'test.implement.d' );
} );
- // @import (bug 31676)
+ // @import (T33676)
QUnit.test( '.implement( styles has @import )', 7, function ( assert ) {
var isJsExecuted, $element,
done = assert.async();
} );
QUnit.test( '.implement( only messages )', 2, function ( assert ) {
- assert.assertFalse( mw.messages.exists( 'bug_29107' ), 'Verify that the test message doesn\'t exist yet' );
+ assert.assertFalse( mw.messages.exists( 'T31107' ), 'Verify that the test message doesn\'t exist yet' );
- // jscs: disable requireCamelCaseOrUpperCaseIdentifiers
- mw.loader.implement( 'test.implement.msgs', [], {}, { bug_29107: 'loaded' } );
- // jscs: enable requireCamelCaseOrUpperCaseIdentifiers
+ mw.loader.implement( 'test.implement.msgs', [], {}, { T31107: 'loaded' } );
return mw.loader.using( 'test.implement.msgs', function () {
- assert.ok( mw.messages.exists( 'bug_29107' ), 'Bug 29107: messages-only module should implement ok' );
+ assert.ok( mw.messages.exists( 'T31107' ), 'T31107: messages-only module should implement ok' );
}, function () {
assert.ok( false, 'Error callback fired while implementing "test.implement.msgs" module' );
} );