Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

data-canvas

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

data-canvas - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

2

package.json
{
"name": "data-canvas",
"version": "0.1.0",
"version": "0.1.1",
"description": "Improved event handling and testing for the HTML5 canvas",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -117,3 +117,4 @@ /**

ctx.drawImage.apply(ctx, arguments);
this.calls = this.calls.concat(transformedCalls(recorder.calls, arguments));
calls = calls.concat(transformedCalls(recorder.calls, arguments));
this.calls = calls;
}

@@ -120,0 +121,0 @@ }

@@ -447,2 +447,19 @@ (function() {

});
// Regression test for #13
it('should record calls after drawImage', function() {
var image = makeOffscreenImage();
var dtx = dataCanvas.getDataContext(canvas);
dtx.clearRect(0, 0, 200, 50);
dtx.drawImage(image, 0, 0);
dtx.fillRect(20, 10, 100, 40);
expect(dtx.calls).to.have.length(5);
expect(dtx.drawnObjects()).to.deep.equal(['A']);
expect(dtx.callsOf('clearRect')).to.deep.equal([['clearRect', 0, 0, 200, 50]]);
expect(dtx.callsOf('fillRect')).to.deep.equal([
['fillRect', 0, 0, 50, 50],
['fillRect', 20, 10, 100, 40]
]);
});
});

@@ -449,0 +466,0 @@ });

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc