Add test in compliments module for remotFile option (#2932)

nothing fancy here, just a simple test after @khassel's changes to the
test setup :-)

Co-authored-by: veeck <michael@veeck.de>
This commit is contained in:
Veeck 2022-10-04 14:26:31 +02:00 committed by GitHub
parent 8212d30c4c
commit ce4906d13b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 37 additions and 0 deletions

View File

@ -11,6 +11,8 @@ _This release is scheduled to be released on 2023-01-01._
### Added ### Added
- Added test for remoteFile option in compliments module
### Removed ### Removed
### Updated ### Updated

View File

@ -0,0 +1,3 @@
{
"anytime": ["Remote compliment file works!"]
}

View File

@ -0,0 +1,21 @@
/* MagicMirror² Test config compliments with remote file
*
* By Rejas
* MIT Licensed.
*/
let config = {
modules: [
{
module: "compliments",
position: "middle_center",
config: {
remoteFile: "http://localhost:8080/tests/configs/data/compliments_test.json"
}
}
]
};
/*************** DO NOT EDIT THE LINE BELOW ***************/
if (typeof module !== "undefined") {
module.exports = config;
}

View File

@ -85,4 +85,15 @@ describe("Compliments module", () => {
}); });
}); });
}); });
describe("remoteFile option", () => {
beforeAll(async () => {
helpers.startApplication("tests/configs/modules/compliments/compliments_remote.js");
await helpers.getDocument();
});
it("should show compliments from a remote file", async () => {
await doTest(["Remote compliment file works!"]);
});
});
}); });