Skip to content

Commit 0f932ba

Browse files
Disable a test as the built-in openssl on macOS does not support negative days (#1457)
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
1 parent 876bff0 commit 0f932ba

1 file changed

Lines changed: 11 additions & 8 deletions

File tree

test/https.ts

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -115,14 +115,17 @@ test('https request with `checkServerIdentity` NOT OK', withHttpsServer(), async
115115
);
116116
});
117117

118-
test('https request with expired certificate', withHttpsServer({days: -1}), async (t, _server, got) => {
119-
await t.throwsAsync(
120-
got({}),
121-
{
122-
code: 'CERT_HAS_EXPIRED'
123-
}
124-
);
125-
});
118+
// The built-in `openssl` on macOS does not support negative days.
119+
if (process.platform !== 'darwin') {
120+
test('https request with expired certificate', withHttpsServer({days: -1}), async (t, _server, got) => {
121+
await t.throwsAsync(
122+
got({}),
123+
{
124+
code: 'CERT_HAS_EXPIRED'
125+
}
126+
);
127+
});
128+
}
126129

127130
test('https request with wrong host', withHttpsServer({commonName: 'not-localhost.com'}), async (t, _server, got) => {
128131
await t.throwsAsync(

0 commit comments

Comments
 (0)