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

30 lines
500 B
JavaScript
Raw Normal View History

2016-03-11 00:48:53 +00:00
define('lib/b', [], { name: 'b' });
define('b1', [], { name: 'b1' });
define('lib/a', ['./b'], function(b) {
return {
name: 'a',
b: b
};
});
require({
map: {
'lib/a': {
'lib/b': 'b1'
}
}
},['lib/a'], function(a) {
doh.register(
'mapConfigRelative',
[
function mapConfigRelative(t){
t.is('a', a.name);
t.is('b1', a.b.name);
}
]
);
doh.run();
});