blob: b8671cf34c97d24a139f0e6e68806f05febd1c39 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
"use strict"; // run code in ES5 strict mode
var path = require("path"),
// different ways to require a module
fs = require("fs"), // native module
c = require("../C/moduleC.js"), // relative path
b = require(path.resolve(__dirname, "../B/moduleB.js")), // absolute path
toSrc = require("toSrc"), // node_modules path
index = require("../"); // index.js path
function exportAll() {
// expose all required modules to test for mocks
exports.fs = fs;
exports.b = b;
exports.c = c;
exports.toSrc = toSrc;
exports.index = index;
exports.process = process;
exports.console = console;
}
exportAll();
exports.exportAll = exportAll;
|