web-apps/vendor/requirejs/tests/packagesNode/packagesNode-tests.js
Maxim Kadushkin 741b10515d webapps added
2016-03-10 21:48:53 -03:00

23 lines
485 B
JavaScript

require({
nodeIdCompat: true,
packages: [{
name: 'foo',
location: 'node_modules/foo',
main: 'lib/index'
}]
}, ['foo'], function (foo) {
doh.register(
'packagesNode',
[
function packagesNode(t){
t.is('foo', foo.name);
t.is('bar', foo.bar.name);
t.is('baz', foo.baz.name);
t.is('bar', foo.baz.bar.name);
}
]
);
doh.run();
});