Skip to content

Commit

Permalink
remove buffer deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
charlierudolph committed Sep 22, 2018
1 parent ff7f683 commit cfc9b4a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions features/attachments.feature
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Feature: Attachments
import {Before} from 'cucumber'
Before(function() {
this.attach(new Buffer([137, 80, 78, 71]), 'image/png')
this.attach(Buffer.from([137, 80, 78, 71]), 'image/png')
})
"""
When I run cucumber-js
Expand All @@ -37,8 +37,8 @@ Feature: Attachments
Before(function(testCase, callback) {
var passThroughStream = new stream.PassThrough()
this.attach(passThroughStream, 'image/png', callback)
passThroughStream.write(new Buffer([137, 80]))
passThroughStream.write(new Buffer([78, 71]))
passThroughStream.write(Buffer.from([137, 80]))
passThroughStream.write(Buffer.from([78, 71]))
passThroughStream.end()
})
"""
Expand All @@ -56,8 +56,8 @@ Feature: Attachments
Before(function() {
var passThroughStream = new stream.PassThrough()
var promise = this.attach(passThroughStream, 'image/png')
passThroughStream.write(new Buffer([137, 80]))
passThroughStream.write(new Buffer([78, 71]))
passThroughStream.write(Buffer.from([137, 80]))
passThroughStream.write(Buffer.from([78, 71]))
passThroughStream.end()
return promise
})
Expand Down

0 comments on commit cfc9b4a

Please sign in to comment.