Files
DocumentServer-v-9.2.0/web-apps/vendor/requirejs/tests/pathArray/withMap/withMap.html
Yajbir Singh f1b860b25c
Some checks failed
check / markdownlint (push) Has been cancelled
check / spellchecker (push) Has been cancelled
updated
2025-12-11 19:03:17 +05:30

64 lines
1.7 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>require.js: Path Array With Map 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',
'real'
]
},
map: {
'*': {
'dep': 'dep-private'
},
'dep-private': {
'dep': 'dep'
}
}
}, ['dep'], function (dep) {
doh.is("real", dep.name);
doh.is(false, threwError);
master.callback(true);
});
doh.register(
"pathArrayWithMap",
[
{
name: "pathArrayWithMap",
timeout: 10000,
runTest: function () {
return master;
}
}
]
);
doh.run();
</script>
</head>
<body>
<h1>require.js: Path Array With Map Test</h1>
<p>Using an array for a path value to get retries, with map in play. See
<a href="https://github.com/requirejs/requirejs/issues/1069">1069</a></p>
<p>Check console for messages</p>
</body>
</html>