Skip to content

Commit 045d12d

Browse files
committed
(#45) Added test to verify behaviour
1 parent d36f1a8 commit 045d12d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Diff for: test/screen.js

+13
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,16 @@ describe("Screen", () => {
88
expect(screenSize.height !== undefined).toBeTruthy();
99
});
1010
});
11+
12+
describe("Capture", () => {
13+
it("fullScreen capture", () => {
14+
// GIVEN
15+
const screenSize = libnut.getScreenSize()
16+
17+
// WHEN
18+
const capture = () => libnut.screen.capture(0, 0, screenSize.width, screenSize.height);
19+
20+
// THEN
21+
expect(capture).not.toThrowError("Error: Given width exceeds display dimensions");
22+
});
23+
});

0 commit comments

Comments
 (0)