Skip to content

Commit

Permalink
chore: remove test
Browse files Browse the repository at this point in the history
  • Loading branch information
jackwotherspoon committed Dec 16, 2024
1 parent 619fba7 commit f6bfc09
Showing 1 changed file with 0 additions and 44 deletions.
44 changes: 0 additions & 44 deletions test/crypto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,47 +66,3 @@ t.test('parseCert missing expiration time', async t => {
'should throw parse ephemeral cert error'
);
});

t.test('parseCert no x509 parser fallback', async t => {
const {cryptoModule} = t.mockRequire('../src/node-crypto', {});
const {parseCert} = t.mockRequire('../src/crypto', {
'../src/node-crypto': {
async cryptoModule() {
const mod = cryptoModule();
return {
...mod,
X509Certificate: undefined,
};
},
},
});
const {cert, expirationTime} = await parseCert(CLIENT_CERT);
t.same(cert, CLIENT_CERT, 'should return original cert in response');
t.same(
expirationTime,
'Jul 22 17:53:09 3022 GMT',
'should return expiration time'
);
});

t.test('parseCert no x509 parser fallback failure', async t => {
const {cryptoModule} = t.mockRequire('../src/node-crypto', {});
const {parseCert} = t.mockRequire('../src/crypto', {
'../src/node-crypto': {
async cryptoModule() {
const mod = cryptoModule();
return {
...mod,
X509Certificate: undefined,
};
},
},
});
return t.rejects(
parseCert('-----BEGIN PUBLIC KEY-----'),
{
code: 'EPARSESQLADMINEPH',
},
'should throw parse ephemeral cert error'
);
});

0 comments on commit f6bfc09

Please sign in to comment.