11cb0ef41Sopenharmony_ci// Flags: --unhandled-rejections=warn 21cb0ef41Sopenharmony_ci'use strict'; 31cb0ef41Sopenharmony_ciconst common = require('../common'); 41cb0ef41Sopenharmony_ci 51cb0ef41Sopenharmony_ciconst expectedValueWarning = ['Symbol()']; 61cb0ef41Sopenharmony_ciconst expectedPromiseWarning = ['Unhandled promise rejection. ' + 71cb0ef41Sopenharmony_ci 'This error originated either by throwing ' + 81cb0ef41Sopenharmony_ci 'inside of an async function without a catch ' + 91cb0ef41Sopenharmony_ci 'block, or by rejecting a promise which was ' + 101cb0ef41Sopenharmony_ci 'not handled with .catch(). To terminate the ' + 111cb0ef41Sopenharmony_ci 'node process on unhandled promise rejection, ' + 121cb0ef41Sopenharmony_ci 'use the CLI flag `--unhandled-rejections=strict` (see ' + 131cb0ef41Sopenharmony_ci 'https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). ' + 141cb0ef41Sopenharmony_ci '(rejection id: 1)']; 151cb0ef41Sopenharmony_ci 161cb0ef41Sopenharmony_cicommon.expectWarning({ 171cb0ef41Sopenharmony_ci UnhandledPromiseRejectionWarning: [ 181cb0ef41Sopenharmony_ci expectedValueWarning, 191cb0ef41Sopenharmony_ci expectedPromiseWarning, 201cb0ef41Sopenharmony_ci ], 211cb0ef41Sopenharmony_ci}); 221cb0ef41Sopenharmony_ci 231cb0ef41Sopenharmony_ci// Ensure this doesn't crash 241cb0ef41Sopenharmony_ciPromise.reject(Symbol()); 25