• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

hustcc / jest-canvas-mock / 180 / 2
100%
master: 100%

Build:
DEFAULT BRANCH: master
Ran 04 Dec 2020 06:39AM UTC
Files 11
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

04 Dec 2020 05:48AM UTC coverage: 100.0%. Remained the same
180.2

push

travis-ci

web-flow
Fix(clip): delete clipping region with restore (#73)

@hustcc please release a patch version after this pull request to version 2.2.1. 

Thanks!

* Fix(clip): delete clipping region with restore

Previously, the restore() method would update its pointer to the previous
clipping region (stackIndex = n-1) in the stack without deleting the current
clipping region (stackIndex = n). This caused problems for future save() calls,
which would push a new clipping region onto the stack at location n+1 while
only incrementing stackIndex to n, thus referencing the wrong region.

This commit fixes the issue by deleting the current clipping region when
restore() is called. By doing this, we lose the ability to inspect old
clipping regions, but this is easy to change in the future if it is desired.

* Address PR comments

Tests have been combined and make better use of the afterEach snapshots.

* Remove excess checks in test

536 of 536 branches covered (100.0%)

Branch coverage included in aggregate %.

1003 of 1003 relevant lines covered (100.0%)

52.26 hits per line

Source Files on job 180.2
  • Tree
  • List 0
  • Changed 4
  • Source Changed 1
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 163
  • Travis Job 180.2
  • c4d1fb29 on github
  • Prev Job for on master (#175.1)
  • Next Job for on master (#189.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc