3.0 source code
This commit is contained in:
5
OfficeWeb/vendor/requirejs/tests/plugins/fromTextEvalError/a.refine
vendored
Normal file
5
OfficeWeb/vendor/requirejs/tests/plugins/fromTextEvalError/a.refine
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
//The refine plugin changes the word refine into define.
|
||||
refine({
|
||||
name: 'a'
|
||||
//Notice missing curly
|
||||
);
|
||||
7
OfficeWeb/vendor/requirejs/tests/plugins/fromTextEvalError/b.refine
vendored
Normal file
7
OfficeWeb/vendor/requirejs/tests/plugins/fromTextEvalError/b.refine
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
//The refine plugin changes the word refine into define.
|
||||
refine(function (require, exports, module) {
|
||||
return {
|
||||
name: 'b',
|
||||
color: module.config().color
|
||||
};
|
||||
});
|
||||
23
OfficeWeb/vendor/requirejs/tests/plugins/fromTextEvalError/fromTextEvalError-tests.js
vendored
Normal file
23
OfficeWeb/vendor/requirejs/tests/plugins/fromTextEvalError/fromTextEvalError-tests.js
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
require.config({
|
||||
baseUrl: requirejs.isBrowser ? './' : './plugins/fromTextEvalError',
|
||||
paths: {
|
||||
'refine': '../fromText/refine',
|
||||
'text': '../../../../text/text'
|
||||
}
|
||||
});
|
||||
|
||||
require(['refine!a'], function (a) {
|
||||
//This should not be called
|
||||
}, function (err) {
|
||||
var message = err + '';
|
||||
|
||||
doh.register(
|
||||
'pluginsFromTextEvalError',
|
||||
[
|
||||
function pluginsFromTextEvalError(t){
|
||||
t.is(-1, message.indexOf('timeout'));
|
||||
}
|
||||
]
|
||||
);
|
||||
doh.run();
|
||||
});
|
||||
14
OfficeWeb/vendor/requirejs/tests/plugins/fromTextEvalError/fromTextEvalError.html
vendored
Normal file
14
OfficeWeb/vendor/requirejs/tests/plugins/fromTextEvalError/fromTextEvalError.html
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>require.js: fromText Eval Error Plugin Test</title>
|
||||
<script type="text/javascript" src="../../doh/runner.js"></script>
|
||||
<script type="text/javascript" src="../../doh/_browserRunner.js"></script>
|
||||
<script type="text/javascript" data-main="fromTextEvalError-tests.js" src="../../../require.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>require.js: fromText Eval Error Plugin Test</h1>
|
||||
<p>Trigger errbacks for plugin fromText eval errors. <a href="https://github.com/jrburke/requirejs/issues/583">More info</a>.</p>
|
||||
<p>Check console for messages</p>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user