npm jest-canvas-mock 2.1.0
v2.1.0

latest releases: 2.5.2, 2.5.1, 2.5.0...
4 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

Don't miss a new jest-canvas-mock release

NewReleases is sending notifications on new releases.