mirror of
https://github.com/TiddlyWiki/TiddlyWiki5.git
synced 2026-04-27 19:24:58 +00:00
Make require() compliant with CommonJS Modules/1.1
This commit is contained in:
16
editions/testcommonjs/tiddlers/relative/program.js
Normal file
16
editions/testcommonjs/tiddlers/relative/program.js
Normal file
@@ -0,0 +1,16 @@
|
||||
/*\
|
||||
title: relative/program.js
|
||||
type: application/javascript
|
||||
module-type: library
|
||||
|
||||
Relative test
|
||||
|
||||
\*/
|
||||
|
||||
|
||||
var test = require('test');
|
||||
var a = require('submodule/a');
|
||||
var b = require('submodule/b');
|
||||
test.assert(a.foo == b.foo, 'a and b share foo through a relative require');
|
||||
test.print('DONE', 'info');
|
||||
|
||||
Reference in New Issue
Block a user