work.suroh.tk/node_modules/app-module-path/test/test.js

13 lines
327 B
JavaScript

var path = require('path');
var assert = require('assert');
require('../').addPath(path.join(__dirname, 'src'));
require('module-a').sayHello();
require('module-b').sayHello();
require('installed-module').sayHello();
assert(require('installed-module.js').isLocal);
require('package.json');
console.log('All tests passed!');