node/test/message/promise_unhandled_warn_with...

9 lines
215 B
JavaScript

// Flags: --unhandled-rejections=warn-with-error-code
'use strict';
require('../common');
const assert = require('assert');
Promise.reject(new Error('alas'));
process.on('exit', assert.strictEqual.bind(null, 1));