| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 15db296 commit ba46103
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -551,7 +551,7 @@ function clearBuffer(stream, state) { | |||
| 551 | 551 | } | |
| 552 | 552 | ||
| 553 | 553 | Writable.prototype._write = function(chunk, encoding, cb) { | |
| 554 | - cb(new errors.Error('ERR_METHOD_NOT_IMPLEMENTED', '_transform')); | ||
| 554 | + cb(new errors.Error('ERR_METHOD_NOT_IMPLEMENTED', '_write')); | ||
| 555 | 555 | }; | |
| 556 | 556 | ||
| 557 | 557 | Writable.prototype._writev = null; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,5 @@ | |||
| 1 | 1 | 'use strict'; | |
| 2 | - require('../common'); | ||
| 2 | + const common = require('../common'); | ||
| 3 | 3 | const assert = require('assert'); | |
| 4 | 4 | ||
| 5 | 5 | const Writable = require('stream').Writable; | |
@@ -26,6 +26,16 @@ w2.write(Buffer.from('blerg')); | |||
| 26 | 26 | w2.write(Buffer.from('blerg')); | |
| 27 | 27 | w2.end(); | |
| 28 | 28 | ||
| 29 | + const w3 = new Writable(); | ||
| 30 | + | ||
| 31 | + w3.on('error', common.expectsError({ | ||
| 32 | + type: Error, | ||
| 33 | + code: 'ERR_METHOD_NOT_IMPLEMENTED', | ||
| 34 | + message: 'The _write method is not implemented' | ||
| 35 | + })); | ||
| 36 | + | ||
| 37 | + w3.end(Buffer.from('blerg')); | ||
| 38 | + | ||
| 29 | 39 | process.on('exit', function() { | |
| 30 | 40 | assert.strictEqual(w._write, _write); | |
| 31 | 41 | assert(_writeCalled); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments