       expected =
         width: 256
       out.on 'data', (data) ->
-        chai.expect(data).to.be.an 'object'
-        chai.expect(data.width).to.be.equal expected.width
-        chai.expect(data.originalWidth).to.be.equal original.width
-        done()
+        buffer = sharp data
+        buffer.metadata (err, meta) ->
+          chai.expect(meta.width).to.be.equal expected.width
+          done()
+
+      width.send expected.width
+      testutils.getBuffer __dirname + '/fixtures/foo.webp', (buffer) ->
+        ins.send buffer
+
+  describe.skip 'when passed a path to WEBP file', ->
+    original =
+      width: 550
+      height: 404
+    it 'should resize it to the specified dimension', (done) ->
+      @timeout 10000
+      expected =
+        width: 256
+      out.on 'data', (data) ->
+        buffer = sharp data
+        buffer.metadata (err, meta) ->
+          chai.expect(meta.width).to.be.equal expected.width
+          done()
 
       width.send expected.width
       ins.send __dirname + '/fixtures/foo.webp'

        width: 128
        height: 256
      out.on 'data', (data) ->
        chai.expect(data).to.be.an 'object'
        chai.expect(data.width).to.be.equal expected.width
        chai.expect(data.height).to.be.equal expected.height
        chai.expect(data.originalWidth).to.be.equal original.width
        chai.expect(data.originalHeight).to.be.equal original.height
        done()

      width.send expected.width
      height.send expected.height
      ins.send __dirname + '/fixtures/lenna.png'

    it 'should resize it right when given just width', (done) ->
      expected =
        width: 128
      out.on 'data', (data) ->
        chai.expect(data).to.be.an 'object'
        chai.expect(data.width).to.be.equal expected.width
        chai.expect(data.height).to.be.equal expected.width
        chai.expect(data.originalWidth).to.be.equal original.width
        chai.expect(data.originalHeight).to.be.equal original.height
        done()

      width.send expected.width
      ins.send __dirname + '/fixtures/lenna.png'

    it 'should resize it right when given just height', (done) ->
      expected =
        height: 128
      out.on 'data', (data) ->
        chai.expect(data).to.be.an 'object'
        chai.expect(data.width).to.be.equal expected.height
        chai.expect(data.height).to.be.equal expected.height
        chai.expect(data.originalWidth).to.be.equal original.width
        chai.expect(data.originalHeight).to.be.equal original.height
        done()

      height.send expected.height
      ins.send __dirname + '/fixtures/lenna.png'

    it 'should resize it right to default dimension', (done) ->
      expected =
        width: 256
        height: 256
      out.on 'data', (data) ->
        chai.expect(data).to.be.an 'object'
        chai.expect(data.width).to.be.equal expected.width
        chai.expect(data.height).to.be.equal expected.height
        chai.expect(data.originalWidth).to.be.equal original.width
        chai.expect(data.originalHeight).to.be.equal original.height
        done()

      ins.send __dirname + '/fixtures/lenna.png'


  chai = require 'chai' unless chai
  Resize = require '../components/Resize-node.coffee'
  testutils = require './testutils'
  sharp = require 'sharp'
else
  Resize = require 'noflo-sharp/components/Resize.js'
  testutils = require 'noflo-image/spec/testutils.js'
