assetgraph-sprite
Advanced tools
Comparing version 0.5.3 to 0.5.4
@@ -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); |
56355
41
892