Skip to content

Commit 562ce50

Browse files
committed
(#307) Mock jimp in e2e testcases to avoid ReferenceErrors
1 parent 581d5f4 commit 562ce50

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

Diff for: e2e/plugin-test/keyboard.class.e2e.spec.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { jestMatchers, Key, keyboard, screen } from "@nut-tree/nut-js";
22
import "@nut-tree/template-matcher";
33

4+
jest.mock('jimp', () => {});
5+
46
jest.setTimeout(30000);
57
expect.extend(jestMatchers);
68

Diff for: lib/expect/matchers/toBeAt.function.e2e.spec.ts

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import { mouse } from "../../../index";
22
import { Point } from "../../point.class";
33
import { toBeAt } from "./toBeAt.function";
44

5+
jest.mock('jimp', () => {});
6+
57
const targetPoint = new Point(100, 100);
68

79
describe(".toBeAt", () => {

Diff for: lib/expect/matchers/toBeIn.function.e2e.spec.ts

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import { Point } from "../../point.class";
33
import { Region } from "../../region.class";
44
import { toBeIn } from "./toBeIn.function";
55

6+
jest.mock('jimp', () => {});
7+
68
const targetPoint = new Point(400, 400);
79

810
describe(".toBeIn", () => {

0 commit comments

Comments
 (0)