web-apps/vendor/requirejs/tests/definedSpecified/definedSpecified-tests.js

34 lines
669 B
JavaScript
Raw Normal View History

2016-03-11 00:48:53 +00:00
/*global doh */
var master = new doh.Deferred();
//Register the test
doh.register(
"definedSpecified",
[
{
name: "definedSpecified",
timeout: 5000,
runTest: function () {
'use strict';
return master;
}
}
]
);
doh.run();
require.config({
baseUrl: './'
});
define('tests', ['require', 'a', 'b'], function(require, a, b) {
'use strict';
doh.is(true, require.specified('a'));
doh.is(true, require.specified('b'));
doh.is(true, require.defined('a'));
doh.is(true, require.defined('b'));
master.callback(true);
});
require(['tests']);