Skip to content

Commit 450a4d3

Browse files
committed
Update node-canvas properly
1 parent 76c90c3 commit 450a4d3

File tree

5 files changed

+11913
-20090
lines changed

5 files changed

+11913
-20090
lines changed

.husky/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

__tests__/shim.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
global.requestAnimationFrame = (callback) => setTimeout(callback, 0);
1+
import { JSDOM } from 'jsdom';
22

3-
HTMLCanvasElement.prototype.getContext = () => ({
4-
clearRect: () => {},
5-
fillRect: () => {},
6-
});
3+
global.Image = new JSDOM('').window.Image;
4+
global.requestAnimationFrame = (callback) => setTimeout(callback, 0);

0 commit comments

Comments
 (0)