jest-canvas-mock

A module used to mock canvas in Jest.

Downloads
7.7M
Stars
307
Committers
26
jest-canvas-mock - v2.5.0 Latest Release

Published by hustcc over 1 year ago

What's Changed

New Contributors

Full Changelog: https://github.com/hustcc/jest-canvas-mock/compare/v2.4.0...v2.5.0

jest-canvas-mock - v2.4.0

Published by hustcc over 2 years ago

What's Changed

New Contributors

Full Changelog: https://github.com/hustcc/jest-canvas-mock/compare/v2.2.0...v2.4.0

jest-canvas-mock - v2.3.0

Published by hustcc about 4 years ago

  • Added Prettier code style
  • Deleted .npmignore and switched to package.json files field
  • Added CONTRIBUTING and CODE_OF_CONDUCT docs
  • Switched to moo-color for color parsing
  • Added contributors to markdown document
  • Add 2 methods of DOMMatrix #70
jest-canvas-mock - v2.2.0

Published by jtenner almost 5 years ago

jest-canvas-mock - v2.1.2

Published by hustcc about 5 years ago

fix(context): ⚓ Removes argument to getters #47

jest-canvas-mock - v2.1.1

Published by hustcc about 5 years ago

  • Feature: Support for ImageData instantiation using a source array(#45)
jest-canvas-mock - v2.1.0

Published by hustcc over 5 years ago

Version 2.1.0

This minor version bump now has some major snapshot support but is backwards compatible.

Changes:

  • Feature: Add CanvasRenderingContext2D method: ctx.__getEvents()
    • Feature: Every successful modification of the CanvasRenderingContext2D state machine logs an _event
  • Feature: Add CanvasRenderingContext2D method: ctx.__getPath()
    • Feature: Every path call adds a _path item and can be accessed via ctx.__getPath()
    • Feature: beginPath() empties the _path
  • Feature: Add CanvasRenderingContext2D method: ctx.__getDrawCalls()
    • Feature: Every draw call adds a _drawCall item and can be accessed via ctx.__getDrawCall()
  • Feature: Add types/index.d.ts file for tooling types (in jest environment)
  • Feature: Support node 12 🎉
  • Docs
    • Updated arc example
    • Added snapshot testing documentation
  • Bug: createLinearGradient now accepts strings
  • Bug: createRadialGradient now accepts strings
  • Bug: globalAlpha now accepts null per Number coercion
  • Feature: Faster finite values checks
  • Feature: Add _path and _events to Path2D
  • Testing: Add and test snapshot outputs
Package Rankings
Top 1.4% on Npmjs.org
Badges
Extracted from project README
Build Status Coverage Status npm npm Mentioned in Awesome Jest
Related Projects