Region captures can't capture the whole screen
s1hofmann opened this issue · 0 comments
s1hofmann commented
Version
2.1.0
Short overview
Due to an off by one error it's impossible to capture the whole screen when specifying a region.
Steps to reproduce error
describe("Capture", () => {
it("fullScreen capture", () => {
// GIVEN
const screenSize = libnut.getScreenSize()
// WHEN
const capture = () => libnut.screen.capture(0, 0, screenSize.width, screenSize.height);
// THEN
expect(capture).not.toThrowError("Error: Given width exceeds display dimensions");
});
});