mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
1d022e8253
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>
13 lines
441 B
JavaScript
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);
|