# What changed in jest-canvas-mock

> 7 changes in jest-canvas-mock 2 from its official release notes, upgrade guides and advisories: 1 breaking, 2 new APIs and options. Each one cited. Sources checked 2026-10-18. HTML: https://unstale.sh/npm/jest-canvas-mock/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## jest-canvas-mock 2

### Breaking changes

- Changed the miterLimit event type from lineWidth to miterLimit. (2.5.8) — [release notes](https://github.com/hustcc/jest-canvas-mock/releases/tag/v2.5.8)

### New APIs and options

- getImageData now supports parameters. (2.5.8) — [release notes](https://github.com/hustcc/jest-canvas-mock/releases/tag/v2.5.8)
- Added roundRect to the canvas mock. (2.5.8) — [release notes](https://github.com/hustcc/jest-canvas-mock/releases/tag/v2.5.8)

### Fixes and other changes

- Corrected the parameter order in DOMException. (2.5.8) — [release notes](https://github.com/hustcc/jest-canvas-mock/releases/tag/v2.5.8)
- Improved the DOMMatrix constructor. (2.5.8) — [release notes](https://github.com/hustcc/jest-canvas-mock/releases/tag/v2.5.8)
- Fixed the setupJestCanvasMock type declaration. (2.5.8) — [release notes](https://github.com/hustcc/jest-canvas-mock/releases/tag/v2.5.8)
- The mock now accounts for a possible TypeError. (2.5.8) — [release notes](https://github.com/hustcc/jest-canvas-mock/releases/tag/v2.5.8)
