0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-21 21:19:50 +01:00
nodejs/test/parallel/test-module-parent-setter-deprecation.js
Antoine du Hamel aaf225a2a0 module: add setter for module.parent
PR-URL: https://github.com/nodejs/node/pull/35522
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-10-17 00:49:56 +02:00

14 lines
301 B
JavaScript

// Flags: --pending-deprecation
'use strict';
const common = require('../common');
common.expectWarning(
'DeprecationWarning',
'module.parent is deprecated due to accuracy issues. Please use ' +
'require.main to find program entry point instead.',
'DEP0144'
);
module.parent = undefined;