1'use strict'; 2const common = require('../common'); 3const fs = require('fs'); 4 5common.expectWarning( 6 'DeprecationWarning', 7 'ReadStream.prototype.open() is deprecated', 'DEP0135'); 8const s = fs.createReadStream('asd') 9 // We don't care about errors in this test. 10 .on('error', () => {}); 11s.open(); 12 13// Allow overriding open(). 14fs.ReadStream.prototype.open = common.mustCall(); 15fs.createReadStream('asd'); 16