mirror of
https://github.com/TiddlyWiki/TiddlyWiki5.git
synced 2026-04-27 21:54:40 +00:00
Make require() compliant with CommonJS Modules/1.1
This commit is contained in:
19
editions/testcommonjs/tiddlers/missing/program.js
Normal file
19
editions/testcommonjs/tiddlers/missing/program.js
Normal file
@@ -0,0 +1,19 @@
|
||||
/*\
|
||||
title: missing/program.js
|
||||
type: application/javascript
|
||||
module-type: library
|
||||
|
||||
Missing test
|
||||
|
||||
\*/
|
||||
|
||||
|
||||
var test = require('test');
|
||||
try {
|
||||
require('bogus');
|
||||
test.print('FAIL require throws error when module missing', 'fail');
|
||||
} catch (exception) {
|
||||
test.print('PASS require throws error when module missing', 'pass');
|
||||
}
|
||||
test.print('DONE', 'info');
|
||||
|
||||
Reference in New Issue
Block a user