mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 12:55:22 +00:00
enable eslint jest/expect-expect and jest/no-done-callback (#3272)
follow up to https://github.com/MichMich/MagicMirror/pull/3270
This commit is contained in:
@@ -21,6 +21,7 @@ describe("AnimateCSS integration Test", () => {
|
||||
* move similar tests in function doTest
|
||||
* @param {string} [animationIn] animation in name of AnimateCSS to test.
|
||||
* @param {string} [animationOut] animation out name of AnimateCSS to test.
|
||||
* @returns {boolean} result
|
||||
*/
|
||||
const doTest = async (animationIn, animationOut) => {
|
||||
await helpers.getDocument();
|
||||
@@ -42,6 +43,7 @@ describe("AnimateCSS integration Test", () => {
|
||||
} else {
|
||||
expect(styles._values["animation-name"]).toBeUndefined();
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
afterEach(async () => {
|
||||
@@ -51,28 +53,28 @@ describe("AnimateCSS integration Test", () => {
|
||||
describe("animateIn and animateOut Test", () => {
|
||||
it("with flipInX and flipOutX animation", async () => {
|
||||
await helpers.startApplication(testConfigFile);
|
||||
await doTest("flipInX", "flipOutX");
|
||||
await expect(doTest("flipInX", "flipOutX")).resolves.toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe("use animateOut name for animateIn (vice versa) Test", () => {
|
||||
it("without animation", async () => {
|
||||
await helpers.startApplication(testConfigFileInvertedAnimationName);
|
||||
await doTest();
|
||||
await expect(doTest()).resolves.toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe("false Animation name test", () => {
|
||||
it("without animation", async () => {
|
||||
await helpers.startApplication(testConfigFileFallbackToDefault);
|
||||
await doTest();
|
||||
await expect(doTest()).resolves.toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe("no Animation defined test", () => {
|
||||
it("without animation", async () => {
|
||||
await helpers.startApplication(testConfigByDefault);
|
||||
await doTest();
|
||||
await expect(doTest()).resolves.toBe(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user