Skip to content

Commit d913d84

Browse files
committed
move test module to mock, fix server paths amd testcase config
1 parent d71f496 commit d913d84

File tree

4 files changed

+3
-3
lines changed

4 files changed

+3
-3
lines changed

js/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ function App () {
177177
moduleFolder = defaultModuleFolder;
178178
} else {
179179
// running in Jest, allow defaultModules placed under moduleDir for testing
180-
if (env.modulesDir === "modules" || env.modulesDir === "tests") {
180+
if (env.modulesDir === "modules" || env.modulesDir === "tests/mocks") {
181181
moduleFolder = defaultModuleFolder;
182182
}
183183
}

js/server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ function Server (config) {
7272
app.use(helmet(config.httpHeaders));
7373
app.use("/js", express.static(__dirname));
7474

75-
let directories = ["/config", "/css", "/fonts", "/modules", "/vendor", "/translations", "/tests/configs", "/tests/mocks", "/tests"];
75+
let directories = ["/config", "/css", "/fonts", "/modules", "/vendor", "/translations", "/tests"];
7676
for (const directory of directories) {
7777
app.use(directory, express.static(path.resolve(global.root_path + directory)));
7878
}

tests/configs/modules/calendar/countCalendarEvents.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ let config = {
22
address: "0.0.0.0",
33
ipWhitelist: [],
44
timeFormat: 12,
5-
foreignModulesDir: "tests",
5+
foreignModulesDir: "tests/mocks",
66
modules: [
77
{
88
module: "calendar",
File renamed without changes.

0 commit comments

Comments
 (0)