mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
a7e5b413ef
PR-URL: https://github.com/nodejs/node/pull/44056 Refs: https://github.com/nodejs/node/issues/42528 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Feng Yu <F3n67u@outlook.com>
20 lines
686 B
JavaScript
20 lines
686 B
JavaScript
// Flags: --expose-internals
|
|
'use strict';
|
|
require('../common');
|
|
|
|
// This test ensures that unnecessary prototypes are no longer
|
|
// being generated by node::NewFunctionTemplate.
|
|
|
|
const assert = require('assert');
|
|
const { internalBinding } = require('internal/test/binding');
|
|
[
|
|
internalBinding('udp_wrap').UDP.prototype.bind6,
|
|
internalBinding('tcp_wrap').TCP.prototype.bind6,
|
|
internalBinding('udp_wrap').UDP.prototype.send6,
|
|
internalBinding('tcp_wrap').TCP.prototype.bind,
|
|
internalBinding('udp_wrap').UDP.prototype.close,
|
|
internalBinding('tcp_wrap').TCP.prototype.open,
|
|
].forEach((binding, i) => {
|
|
assert.strictEqual('prototype' in binding, false, `Test ${i} failed`);
|
|
});
|