Skip to content

Commit 577d797

Browse files
committed
fix app.js to map default modules in during test with foreignDir set to tests
1 parent efc0fd4 commit 577d797

File tree

2 files changed

+3
-3
lines changed

2 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") {
180+
if (env.modulesDir === "modules" || env.modulesDir === "tests") {
181181
moduleFolder = defaultModuleFolder;
182182
}
183183
}

tests/electron/modules/calendar_spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,9 +292,9 @@ describe("Calendar module", () => {
292292
});
293293

294294
describe("count events broadcast", () => {
295-
it("with maxentries set to 12", async () => {
295+
it("get 12 with maxentries set to 1", async () => {
296296
await helpers.startApplication("tests/configs/modules/calendar/countCalendarEvents.js", "01 Jan 2024 12:30:00 GMT-076:00", ["js/electron.js"], "America/Chicago");
297-
await new Promise((r) => setTimeout(r, 60000));
297+
//await new Promise((r) => setTimeout(r, 60000));
298298
await expect(doTestTableContent(".testNotification", ".elementCount", "12", first)).resolves.toBe(true);
299299
});
300300
});

0 commit comments

Comments
 (0)