mirror of
https://github.com/nodejs/node.git
synced 2025-05-07 09:52:26 +00:00

Make changes so that tests will pass when the comma-dangle settings applied to the rest of the code base are also applied to tests. PR-URL: https://github.com/nodejs/node/pull/37930 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is>
20 lines
693 B
JavaScript
20 lines
693 B
JavaScript
// Flags: --expose-internals
|
|
'use strict';
|
|
require('../common');
|
|
|
|
// This test ensures that unnecessary prototypes are no longer
|
|
// being generated by Environment::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`);
|
|
});
|