nodejs/test/parallel/test-fs-read-stream-patch-open.js
James M Snell a273674dee
fs: move fs stream open method to eol
The `open()` method on fs read and write streams has been
deprecated for many years. It's time to remove it while
still allowing the open method to be monkeypatched since
that's still apparently a thing.

PR-URL: https://github.com/nodejs/node/pull/58529
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Jason Zhang <xzha4350@gmail.com>
2025-06-02 16:54:31 +00:00

7 lines
156 B
JavaScript

'use strict';
const common = require('../common');
const fs = require('fs');
fs.ReadStream.prototype.open = common.mustCall();
fs.createReadStream('asd');