11cb0ef41Sopenharmony_ci'use strict'; 21cb0ef41Sopenharmony_ciconst { mustNotCall, expectsError } = require('../common'); 31cb0ef41Sopenharmony_ciconst { Readable } = require('stream'); 41cb0ef41Sopenharmony_ci 51cb0ef41Sopenharmony_ciasync function* generate() { 61cb0ef41Sopenharmony_ci yield null; 71cb0ef41Sopenharmony_ci} 81cb0ef41Sopenharmony_ci 91cb0ef41Sopenharmony_ciconst stream = Readable.from(generate()); 101cb0ef41Sopenharmony_ci 111cb0ef41Sopenharmony_cistream.on('error', expectsError({ 121cb0ef41Sopenharmony_ci code: 'ERR_STREAM_NULL_VALUES', 131cb0ef41Sopenharmony_ci name: 'TypeError', 141cb0ef41Sopenharmony_ci message: 'May not write null values to stream' 151cb0ef41Sopenharmony_ci})); 161cb0ef41Sopenharmony_ci 171cb0ef41Sopenharmony_cistream.on('data', mustNotCall()); 181cb0ef41Sopenharmony_ci 191cb0ef41Sopenharmony_cistream.on('end', mustNotCall()); 20