Refuse a maxOctets below 1 at startup, like the other limits
Test / lint (pull_request) Successful in 49s
Test / test (18) (pull_request) Successful in 29s
Test / test (20) (pull_request) Successful in 29s
Test / test (22) (pull_request) Successful in 29s
Test / test (24) (pull_request) Successful in 28s
Test / test (26) (pull_request) Successful in 29s
Mirror / push (push) Successful in 3s
Test / lint (pull_request) Successful in 49s
Test / test (18) (pull_request) Successful in 29s
Test / test (20) (pull_request) Successful in 29s
Test / test (22) (pull_request) Successful in 29s
Test / test (24) (pull_request) Successful in 28s
Test / test (26) (pull_request) Successful in 29s
Mirror / push (push) Successful in 3s
This commit is contained in:
@@ -2688,6 +2688,14 @@ describe('option validation', () => {
|
||||
assert.match(hookRefused.err?.message ?? '', /onRequest must be a function/);
|
||||
});
|
||||
|
||||
test('refuses a reassembly octet cap below 1 at startup', async () => {
|
||||
const listening = await server({ maxOctets: 0, port: 0 });
|
||||
|
||||
if (listening.server) await listening.server.close();
|
||||
|
||||
assert.match(listening.err?.message ?? '', /maxOctets must be 1 or more, got 0/);
|
||||
});
|
||||
|
||||
test('returns an error rather than rejecting on an impossible port', async () => {
|
||||
const listening = await server({ port: 70_000 });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user