mirror of https://github.com/nodejs/node.git
15 lines
490 B
JavaScript
15 lines
490 B
JavaScript
'use strict';
|
|
|
|
const common = require('../common');
|
|
const assert = require('assert');
|
|
const { isMainThread } = require('worker_threads');
|
|
|
|
if (!isMainThread) {
|
|
common.skip('process.abort() is not available in Workers');
|
|
}
|
|
|
|
// Check that our built-in methods do not have a prototype/constructor behaviour
|
|
// if they don't need to. This could be tested for any of our C++ methods.
|
|
assert.strictEqual(process.abort.prototype, undefined);
|
|
assert.throws(() => new process.abort(), TypeError);
|