11cb0ef41Sopenharmony_ci'use strict'; 21cb0ef41Sopenharmony_ci 31cb0ef41Sopenharmony_ciconst common = require('../common'); 41cb0ef41Sopenharmony_ciconst { Readable } = require('stream'); 51cb0ef41Sopenharmony_ci 61cb0ef41Sopenharmony_ci{ 71cb0ef41Sopenharmony_ci // Don't emit 'end' after 'close'. 81cb0ef41Sopenharmony_ci 91cb0ef41Sopenharmony_ci const r = new Readable(); 101cb0ef41Sopenharmony_ci 111cb0ef41Sopenharmony_ci r.on('end', common.mustNotCall()); 121cb0ef41Sopenharmony_ci r.resume(); 131cb0ef41Sopenharmony_ci r.destroy(); 141cb0ef41Sopenharmony_ci r.on('close', common.mustCall(() => { 151cb0ef41Sopenharmony_ci r.push(null); 161cb0ef41Sopenharmony_ci })); 171cb0ef41Sopenharmony_ci} 18