mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
54b36e401d
Refs: #23133 PR-URL: https://github.com/nodejs/node/pull/29656 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Denys Otrishko <shishugi@gmail.com>
18 lines
444 B
JavaScript
18 lines
444 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const fs = require('fs');
|
|
|
|
common.expectWarning(
|
|
'DeprecationWarning',
|
|
'ReadStream.prototype.open() is deprecated', 'DEP0135');
|
|
const s = fs.createReadStream('asd')
|
|
// We don't care about errors in this test.
|
|
.on('error', () => {});
|
|
s.open();
|
|
|
|
process.nextTick(() => {
|
|
// Allow overriding open().
|
|
fs.ReadStream.prototype.open = common.mustCall();
|
|
fs.createReadStream('asd');
|
|
});
|