xref: /third_party/node/test/node-api/test_fatal_exception/test.js
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/node/test/node-api/test_fatal_exception/
11cb0ef41Sopenharmony_ci'use strict';
21cb0ef41Sopenharmony_ciconst common = require('../../common');
31cb0ef41Sopenharmony_ciconst assert = require('assert');
41cb0ef41Sopenharmony_ciconst test_fatal = require(`./build/${common.buildType}/test_fatal_exception`);
51cb0ef41Sopenharmony_ci
61cb0ef41Sopenharmony_ciprocess.on('uncaughtException', common.mustCall(function(err) {
71cb0ef41Sopenharmony_ci  assert.strictEqual(err.message, 'fatal error');
81cb0ef41Sopenharmony_ci}));
91cb0ef41Sopenharmony_ci
101cb0ef41Sopenharmony_ciconst err = new Error('fatal error');
111cb0ef41Sopenharmony_citest_fatal.Test(err);
12

Indexes created Thu Nov 07 10:32:03 CST 2024