Skip to content

Commit 9640030

Browse files
authored
chore: Improved unit test speed (#2728)
1 parent 36adb13 commit 9640030

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/lib/fake-cert.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ const selfCert = require('self-cert')
3232
*/
3333
module.exports = function fakeCert({ commonName = null } = {}) {
3434
const cert = selfCert({
35+
// We set the certificate bits to 1,024 because we don't need 4,096 bit
36+
// certificates for tests. This speeds up certificate generation time by
37+
// a significant amount, and thus speeds up tests that rely on these
38+
// certificates.
39+
bits: 1_024,
3540
attrs: {
3641
commonName: commonName,
3742
stateName: 'Georgia',

0 commit comments

Comments
 (0)