node/test/fixtures/cycles/warning-skip-proxy-traps-b.js
Ruben Bridgewater 24bf1adacc module: do not check circular dependencies for exported proxies
In case the exported module is a proxy that has the `getPrototypeOf`
or `setPrototypeOf` trap, skip the circular dependencies check.
It would otherwise be triggered by the check itself.

Fixes: https://github.com/nodejs/node/issues/33334

Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de>

PR-URL: https://github.com/nodejs/node/pull/33338
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
2020-05-15 01:55:28 +02:00

11 lines
214 B
JavaScript

const assert = require('assert');
const object = require('./warning-skip-proxy-traps-a.js');
assert.throws(() => {
object.missingPropProxyTrap;
}, {
message: 'get: missingPropProxyTrap',
name: 'Error',
});