mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
ff5a1cf5a8
Refs: https://github.com/nodejs/node/pull/29061 PR-URL: https://github.com/nodejs/node/pull/29969 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
16 lines
409 B
JavaScript
16 lines
409 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();
|
|
|
|
// Allow overriding open().
|
|
fs.ReadStream.prototype.open = common.mustCall();
|
|
fs.createReadStream('asd');
|