mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 11:50:00 +00:00
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:
parent
8212d30c4c
commit
ce4906d13b
@ -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
|
||||||
|
3
tests/configs/data/compliments_test.json
Normal file
3
tests/configs/data/compliments_test.json
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"anytime": ["Remote compliment file works!"]
|
||||||
|
}
|
21
tests/configs/modules/compliments/compliments_remote.js
Normal file
21
tests/configs/modules/compliments/compliments_remote.js
Normal 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;
|
||||||
|
}
|
@ -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!"]);
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user