Skip to content

Commit

Permalink
tests; update webp test, currently does not work.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanong committed Apr 23, 2013
1 parent 3a8bee2 commit 3a4b1f0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/command.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ module.exports = function (proto) {
}

if (format) {
format = format.split('.').slice(-1)[0].toUpperCase();
format = format.split('.').pop();
this.outname = format + ":-";
}

Expand Down
12 changes: 7 additions & 5 deletions test/webp.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@ module.exports = function (_, dir, finish, gm, im) {
if (!gm.integration) return finish()

if (!im) {
console.log('GraphicsMagick currently does not support webp :(')
// GraphicsMagick currently does not support webp :(
return finish()
}

gm = gm.subClass({
imageMagick: true
})

var image = dir + '/original.png'

write(function (err) {
Expand All @@ -26,9 +30,7 @@ module.exports = function (_, dir, finish, gm, im) {
if (err) return done(err)

assert.ok(value)
console.log(value)
assert.equal(value.format = 'webp')

assert.equal(value.format, 'PNG')
done()
})
})
Expand All @@ -43,7 +45,7 @@ module.exports = function (_, dir, finish, gm, im) {
if (err) return done(err)

assert.ok(value)
assert.equal(value.format = 'webp')
assert.equal(value.format, 'PNG')

done()
})
Expand Down

0 comments on commit 3a4b1f0

Please sign in to comment.