forked from requirejs/requirejs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpathArray.html
More file actions
56 lines (51 loc) · 1.46 KB
/
pathArray.html
File metadata and controls
56 lines (51 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<!DOCTYPE html>
<html>
<head>
<title>require.js: Path Array Test</title>
<script type="text/javascript" src="../../require.js"></script>
<script type="text/javascript" src="../doh/runner.js"></script>
<script type="text/javascript" src="../doh/_browserRunner.js"></script>
<script type="text/javascript">
var master = new doh.Deferred(),
threwError = false;
requirejs.onError = function (err) {
threwError = true;
throw err;
};
requirejs({
waitSeconds: 2,
enforceDefine: true,
paths: {
'dep': [
'fake1',
'fake2',
'real'
]
}
}, ['dep'], function (dep) {
doh.is("real", dep.name);
doh.is(false, threwError);
master.callback(true);
});
doh.register(
"pathArray",
[
{
name: "pathArray",
timeout: 10000,
runTest: function () {
return master;
}
}
]
);
doh.run();
</script>
</head>
<body>
<h1>require.js: Path Array Test</h1>
<p>Using an array for a path value to get retries. See
<a href="https://github.com/requirejs/requirejs/issues/257">257</a></p>
<p>Check console for messages</p>
</body>
</html>