Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fmt
  • Loading branch information
timja committed Feb 27, 2025
commit 62c35dd3d45c961ca64b85d0a8095c133fd388da
9 changes: 6 additions & 3 deletions test/parallel/test-native-certs.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -130,17 +130,20 @@ describe('use-system-ca', function() {
let server;

beforeEach(async function() {
server = await setupServer('non-trusted-leaf-from-intermediate-key.pem', 'non-trusted-leaf-from-intermediate-cert.pem');
server = await setupServer(
'non-trusted-leaf-from-intermediate-key.pem',
'non-trusted-leaf-from-intermediate-cert.pem'
);
});

it('can connect successfully', async function() {
try {
await fetch(`https://localhost:${server.address().port}/hello-world`);
} catch (err) {
if (common.isWindows) {
assert.equal(err.cause.code, "UNABLE_TO_GET_ISSUER_CERT");
assert.strictEqual(err.cause.code, 'UNABLE_TO_GET_ISSUER_CERT');
} else {
assert.equal(err.cause.code, "UNABLE_TO_VERIFY_LEAF_SIGNATURE");
assert.strictEqual(err.cause.code, 'UNABLE_TO_VERIFY_LEAF_SIGNATURE');
}
}
});
Expand Down