web-apps/vendor/requirejs/tests/mapConfig/mapConfigDelayed-tests.js

40 lines
788 B
JavaScript
Raw Normal View History

2016-03-11 00:48:53 +00:00
define('one', function () {
return { name: 'one' };
});
define('two', function () {
return { name: 'two' };
});
define('three', ['one'], function (one) {
return { name: 'three',
one: one
};
});
require([], function() {
require({
map : {
'*': {
'one': 'two'
}
}
},
['three'],
function (three) {
doh.register(
'mapConfigDelayed',
[
function mapConfigDelayed(t){
t.is('three', three.name);
t.is('two', three.one.name);
}
]
);
doh.run();
}
);
});
define("app", function(){});