New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

assetgraph-sprite

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

assetgraph-sprite - npm Package Compare versions

Comparing version 0.5.3 to 0.5.4

test/spriteBackgroundImages/brokenImages/broken1.png

4

package.json

@@ -5,3 +5,3 @@ {

"repository": "git://github.com/One-com/assetgraph-sprite.git",
"version": "0.5.3",
"version": "0.5.4",
"maintainers": [

@@ -23,3 +23,3 @@ {

"optionalDependencies": {
"canvas": "=1.0.1"
"canvas": "=1.1.1"
},

@@ -26,0 +26,0 @@ "devDependencies": {

@@ -144,3 +144,3 @@ var vows = require('vows'),

},
'the graph contains 1 Png': function (assetGraph) {
'the graph contains 1 Pngs': function (assetGraph) {
assert.equal(assetGraph.findAssets({type: 'Png'}).length, 1);

@@ -197,3 +197,3 @@ },

},
'the graph contains 3 Png': function (assetGraph) {
'the graph contains 3 Pngs': function (assetGraph) {
assert.equal(assetGraph.findAssets({type: 'Png'}).length, 3);

@@ -224,3 +224,3 @@ },

},
'the graph contains 3 Png': function (assetGraph) {
'the graph contains 3 Pngs': function (assetGraph) {
assert.equal(assetGraph.findAssets({type: 'Png'}).length, 3);

@@ -251,3 +251,3 @@ },

},
'the graph contains 2 Png': function (assetGraph) {
'the graph contains 2 Pngs': function (assetGraph) {
assert.equal(assetGraph.findAssets({type: 'Png'}).length, 2);

@@ -270,3 +270,25 @@ },

}
},
'After loading a test case with broken images': {
topic: function () {
new AssetGraph({root: __dirname + '/spriteBackgroundImages/brokenImages/'})
.loadAssets('style.css')
.populate()
.run(this.callback);
},
'the graph contains 2 Pngs': function (assetGraph) {
assert.equal(assetGraph.findAssets({type: 'Png'}).length, 2);
},
'then spriting the background images': {
topic: function (assetGraph) {
assetGraph.queue(spriteBackgroundImages()).run(this.callback);
},
'the number of Png assets should still be 1': function (assetGraph) {
assert.equal(assetGraph.findAssets({type: 'Png'}).length, 1);
},
'the graph should contain 1 CssImage relation': function (assetGraph) {
assert.equal(assetGraph.findRelations({type: 'CssImage'}).length, 1);
}
}
}
})['export'](module);
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