49 lines
1.3 KiB
HTML
49 lines
1.3 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>require.js: Require Errback Skip 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(),
|
|
failed = false;
|
|
|
|
function done() {
|
|
if (!failed) {
|
|
master.callback(true);
|
|
}
|
|
}
|
|
define('a', {name: 'a'});
|
|
|
|
require(['a'], function (a) {
|
|
a.whatever.fail = 'fail';
|
|
}, function (err) {
|
|
failed = true;
|
|
});
|
|
|
|
setTimeout(done, 500);
|
|
|
|
doh.register(
|
|
"errorRequireErrback",
|
|
[
|
|
{
|
|
name: "errorRequireErrback",
|
|
timeout: 1000,
|
|
runTest: function () {
|
|
return master;
|
|
}
|
|
}
|
|
]
|
|
);
|
|
doh.run();
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<h1>require.js: Require Errback Skip Test</h1>
|
|
<p>An error in the require callback should not trigger the errback.
|
|
<a href="https://github.com/jrburke/requirejs/issues/699">More info</a>.</p>
|
|
<p>Check console for messages</p>
|
|
</body>
|
|
</html>
|