Support for ImageData instantiation using a source array
This PR introduces changes in the
ImageData class to comply with the official specification.
ImageData()now supports instantiation using the syntax:
new ImageData(array, width [, height]);.
- More semantic error types.
- Test suite for the class was refactored, each inner
describeblock corresponds to each valid way to instantiate
ImageData. All tests from the previous version are in the first inner
7条回答 默认 最新
- weixin_39629969 2020-12-09 07:18点赞 评论 复制链接分享
- weixin_39629969 2020-12-09 07:18
Wow. At first glance, this looks great and comprehensive. The test suite meets my expectations, and it appears to follow the specification.
I will take some time to read the specs and go over the algorithms to look for some improvements, and inspect why coverage is reported at
99.931%. (Very strange.)点赞 评论 复制链接分享
- weixin_39782573 2020-12-09 07:18
Hi , thanks for replying quickly.
The coverage issue was caused by a single line that wasn't covered because of a small typo in the test suite. The issue was fixed in the second commit.点赞 评论 复制链接分享
- weixin_39703773 2020-12-09 07:18
You can decide whether to merge the PR or not. And what is your npm id, you can help to release the new version.点赞 评论 复制链接分享
Thank you .
I really like this pull request. Just want to give myself a little time with it to make sure everything is truly covered.
The honest truth is it was a total oversight of mine not to have included it in the first place :)点赞 评论 复制链接分享
Alright! Looks good. I'm pretty confident this will be okay in production. It's just that this software was downloaded 88k times this week, and I wanted to sit on the pull request until I was absolutely confident it would be okay.
we can release a minor update
Is it possible to get access to publish this on npm as well?
npm id: jtenner点赞 评论 复制链接分享