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

35 lines
886 B
JavaScript

require({
baseUrl: requirejs.isBrowser ? "./" : "./relative/",
paths: {
text: "../../../text/text"
},
packages: [
{
name: 'greek',
main: 'main',
lib: '.'
}
]
},
["require", "foo/bar/one", "greek/alpha"],
function(require, one, alpha) {
doh.register(
"relative",
[
function relative(t){
t.is("one", one.name);
t.is("bar", one.barName);
t.is("two", one.twoName);
t.is("three", one.threeName);
t.is("hello world", one.message);
t.is('alpha', alpha.name);
t.is('greek', alpha.getGreekName());
}
]
);
doh.run();
}
);