test: remove unused common utilities · nodejs/node@f48992f · GitHub
Skip to content

Commit f48992f

Browse files
avivkellermarco-ippolito
authored andcommitted
test: remove unused common utilities
PR-URL: #54825 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
1 parent 0c1666a commit f48992f

5 files changed

Lines changed: 0 additions & 170 deletions

File tree

test/common/README.md

Lines changed: 0 additions & 31 deletions

test/common/crypto.js

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,6 @@ const modp2buf = Buffer.from([
3333
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
3434
]);
3535

36-
function testDH({ publicKey: alicePublicKey, privateKey: alicePrivateKey },
37-
{ publicKey: bobPublicKey, privateKey: bobPrivateKey },
38-
expectedValue) {
39-
const buf1 = crypto.diffieHellman({
40-
privateKey: alicePrivateKey,
41-
publicKey: bobPublicKey,
42-
});
43-
const buf2 = crypto.diffieHellman({
44-
privateKey: bobPrivateKey,
45-
publicKey: alicePublicKey,
46-
});
47-
assert.deepStrictEqual(buf1, buf2);
48-
49-
if (expectedValue !== undefined)
50-
assert.deepStrictEqual(buf1, expectedValue);
51-
}
52-
5336
// Asserts that the size of the given key (in chars or bytes) is within 10% of
5437
// the expected size.
5538
function assertApproximateSize(key, expectedSize) {
@@ -117,7 +100,6 @@ const sec1EncExp = (cipher) => getRegExpForPEM('EC PRIVATE KEY', cipher);
117100

118101
module.exports = {
119102
modp2buf,
120-
testDH,
121103
assertApproximateSize,
122104
testEncryptDecrypt,
123105
testSignVerify,

test/common/http2.js

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -81,24 +81,6 @@ class SettingsFrame extends Frame {
8181
}
8282
}
8383

84-
class DataFrame extends Frame {
85-
constructor(id, payload, padlen = 0, final = false) {
86-
let len = payload.length;
87-
let flags = 0;
88-
if (final) flags |= FLAG_EOS;
89-
const buffers = [payload];
90-
if (padlen > 0) {
91-
buffers.unshift(Buffer.from([padlen]));
92-
buffers.push(PADDING.slice(0, padlen));
93-
len += padlen + 1;
94-
flags |= FLAG_PADDED;
95-
}
96-
super(len, 0, flags, id);
97-
buffers.unshift(this[kFrameData]);
98-
this[kFrameData] = Buffer.concat(buffers);
99-
}
100-
}
101-
10284
class HeadersFrame extends Frame {
10385
constructor(id, payload, padlen = 0, final = false) {
10486
let len = payload.length;
@@ -138,7 +120,6 @@ class AltSvcFrame extends Frame {
138120
module.exports = {
139121
Frame,
140122
AltSvcFrame,
141-
DataFrame,
142123
HeadersFrame,
143124
SettingsFrame,
144125
PingFrame,

test/common/tick.js

Lines changed: 0 additions & 1 deletion

test/common/udppair.js

Lines changed: 0 additions & 101 deletions
This file was deleted.

0 commit comments

Comments
 (0)