0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/test/parallel/test-process-abort.js
Ruben Bridgewater 1d022e8253
process: improve cwd performance
This caches the current working directory and only updates the variable
if `process.chdir()` is called.

PR-URL: https://github.com/nodejs/node/pull/27224
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2019-04-26 18:43:11 +02:00

13 lines
441 B
JavaScript

'use strict';
const common = require('../common');
const assert = require('assert');
if (!common.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);