tests; update webp test, currently does not work.

master
Jonathan Ong 11 years ago
parent 3a8bee20a3
commit 3a4b1f0b61
  1. 2
      lib/command.js
  2. 12
      test/webp.js

@ -114,7 +114,7 @@ module.exports = function (proto) {
}
if (format) {
format = format.split('.').slice(-1)[0].toUpperCase();
format = format.split('.').pop();
this.outname = format + ":-";
}

@ -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) {
@ -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()
})
})
@ -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()
})

Loading…
Cancel
Save