Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix empty part-of-day logic #3726

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions tests/configs/modules/compliments/compliments_evening.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
let config = {
address: "0.0.0.0",
ipWhitelist: [],
timeFormat: 12,

modules: [
{
module: "compliments",
position: "middle_center",
config: {
compliments: {
evening: ["Evening here"]
}
}
}
]
};

/*************** DO NOT EDIT THE LINE BELOW ***************/
if (typeof module !== "undefined") {
module.exports = config;
}
4 changes: 4 additions & 0 deletions tests/electron/modules/compliments_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@
await helpers.startApplication("tests/configs/modules/compliments/compliments_parts_day.js", "01 Oct 2022 20:00:00 GMT");
await expect(doTest(["Hello There", "Good Evening", "Evening test"])).resolves.toBe(true);
});

it("doesnt show evening compliments during the day when the other parts of day are not set", async () => {

Check warning on line 38 in tests/electron/modules/compliments_spec.js

View workflow job for this annotation

GitHub Actions / code-style-check

Test has no assertions
await helpers.startApplication("tests/configs/modules/compliments/compliments_evening.js", "01 Oct 2022 10:00:00 GMT");
});
});

describe("Feature date in compliments module", () => {
Expand Down
Loading