1'use strict'; 2 3const common = require('../common'); 4const fs = require('fs'); 5 6{ 7 const s = fs.createReadStream(__filename); 8 9 s.close(common.mustCall()); 10 s.close(common.mustCall()); 11} 12 13{ 14 const s = fs.createReadStream(__filename); 15 16 // This is a private API, but it is worth testing. close calls this 17 s.destroy(null, common.mustCall()); 18 s.destroy(null, common.mustCall()); 19} 20