set encoding when reading from streams
using .toString() works most of the time but can lead to utf8 characters being broken across chunk boundaries. https://nodejs.org/api/stream.html#stream_readable_setencoding_encoding
This commit is contained in:
@@ -294,6 +294,7 @@ describe('CompileManager', function() {
|
||||
this.proc = new EventEmitter()
|
||||
this.proc.stdout = new EventEmitter()
|
||||
this.proc.stderr = new EventEmitter()
|
||||
this.proc.stderr.setEncoding = sinon.stub().returns(this.proc.stderr)
|
||||
this.child_process.spawn = sinon.stub().returns(this.proc)
|
||||
this.CompileManager.clearProject(
|
||||
this.project_id,
|
||||
@@ -328,6 +329,7 @@ describe('CompileManager', function() {
|
||||
this.proc = new EventEmitter()
|
||||
this.proc.stdout = new EventEmitter()
|
||||
this.proc.stderr = new EventEmitter()
|
||||
this.proc.stderr.setEncoding = sinon.stub().returns(this.proc.stderr)
|
||||
this.child_process.spawn = sinon.stub().returns(this.proc)
|
||||
this.CompileManager.clearProject(
|
||||
this.project_id,
|
||||
|
||||
Reference in New Issue
Block a user