3.0 source code
This commit is contained in:
39
OfficeWeb/vendor/requirejs/tests/mapConfig/mapConfigDelayed-tests.js
vendored
Normal file
39
OfficeWeb/vendor/requirejs/tests/mapConfig/mapConfigDelayed-tests.js
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
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(){});
|
||||
Reference in New Issue
Block a user