-window.awesome = true;
+window.mw.loader.testCallback = function(){
+ start();
+ deepEqual( true, true, 'Implementing a module, is the callback timed properly ?');
+};
"Extracting path from local URL (file://) with fragment"
);
+ // Asynchronous ahead
stop();
- var tests_path = rePath.exec( location.href ); // Extract path
+ // Extract path
+ var tests_path = rePath.exec( location.href );
+
mw.loader.implement( 'is.awesome', [tests_path + 'sample/awesome.js'], {}, {} );
+
mw.loader.using( 'is.awesome', function(){
- start();
- deepEqual( window.awesome, true, 'Implementing a module, is the callback timed properly ?');
- // Clean up
- delete window.awesome;
+ // awesome.js declares this function
+ mw.loader.testCallback();
}, function(){
start();
- deepEqual( 'mw.loader.using error callback fired', true, 'Implementing a module, is the callback timed properly ?');
+ deepEqual( true, false, 'Implementing a module, error callback fired!');
});
});