What's the principle of `jest-canvas-mock`

Viewed 5

The git repo is https://github.com/hustcc/jest-canvas-mock I can see it implements the methods of the HTMLCanvasElement.prototype, but what if window.HTMLCanvasElement does not exist? Can anybody explain this?

0 Answers
Related