Debian Codegraph @

tests/plugins/relative/pluginRelative.js

raw
1
2 define('plugin', {
3 load: function (id, require, load, config) {
4 throw new Error("Dynamic load not allowed: " + id);
5 }
6 });
7
8 define('plugin!src/b', [], function () {
9 return {
10 name: 'b'
11 };
12 });
13
14
15 define('plugin!src/a', ['plugin!./b'], function (b) {
16 return {
17 name: 'a',
18 b: b
19 };
20 });
21
22 require(['plugin!src/a'], function (a) {
23
24 doh.register(
25 'pluginRelative',
26 [
27 function pluginRelative(t){
28 t.is('a', a.name);
29 t.is('b', a.b.name);
30 }
31 ]
32 );
33 doh.run();
34
35 });
36
37 define("pluginRelative-tests", function(){});