+ return mw.loader.using( 'test.empty', function () {
+ assert.strictEqual( mw.loader.getState( 'test.empty' ), 'ready' );
+ } );
+ } );
+
+ QUnit.test( '.addSource()', function ( assert ) {
+ mw.loader.addSource( { testsource1: 'https://1.test/src' } );
+
+ assert.throws( function () {
+ mw.loader.addSource( { testsource1: 'https://1.test/src' } );
+ }, /already registered/, 'duplicate pair from addSource(Object)' );
+
+ assert.throws( function () {
+ mw.loader.addSource( { testsource1: 'https://1.test/src-diff' } );
+ }, /already registered/, 'duplicate ID from addSource(Object)' );