xref: /third_party/node/test/parallel/test-fs-read-stream-patch-open.js
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/node/test/parallel/
11cb0ef41Sopenharmony_ci'use strict';
21cb0ef41Sopenharmony_ciconst common = require('../common');
31cb0ef41Sopenharmony_ciconst fs = require('fs');
41cb0ef41Sopenharmony_ci
51cb0ef41Sopenharmony_cicommon.expectWarning(
61cb0ef41Sopenharmony_ci  'DeprecationWarning',
71cb0ef41Sopenharmony_ci  'ReadStream.prototype.open() is deprecated', 'DEP0135');
81cb0ef41Sopenharmony_ciconst s = fs.createReadStream('asd')
91cb0ef41Sopenharmony_ci  // We don't care about errors in this test.
101cb0ef41Sopenharmony_ci  .on('error', () => {});
111cb0ef41Sopenharmony_cis.open();
121cb0ef41Sopenharmony_ci
131cb0ef41Sopenharmony_ciprocess.nextTick(() => {
141cb0ef41Sopenharmony_ci  // Allow overriding open().
151cb0ef41Sopenharmony_ci  fs.ReadStream.prototype.open = common.mustCall();
161cb0ef41Sopenharmony_ci  fs.createReadStream('asd');
171cb0ef41Sopenharmony_ci});
18

Indexes created Thu Nov 07 10:32:03 CST 2024