Skip to content

fix(config): allow null values in header rules#849

Open
ReinerBRO wants to merge 1 commit intovercel:mainfrom
ReinerBRO:fix-header-removal-null-438
Open

fix(config): allow null values in header rules#849
ReinerBRO wants to merge 1 commit intovercel:mainfrom
ReinerBRO:fix-header-removal-null-438

Conversation

@ReinerBRO
Copy link
Copy Markdown

Summary

  • allow to be during schema validation
  • add a config fixture and regression test that loads header-removal rules

Why

supports using to remove a previously defined header value, but rejected such config values before passing config through.

Fixes #438.

Testing

serve@14.2.6 test:tsc /Users/h1syu1/PythonProjects/prs2-serve/serve
tsc --project tsconfig.json

RUN v2.1.3 /Users/h1syu1/PythonProjects/prs2-serve/serve
Coverage enabled with v8

✓ tests/config.test.ts (6 tests) 43ms

Test Files 1 passed (1)
Tests 6 passed (6)
Start at 03:26:55
Duration 493ms (transform 23ms, setup 0ms, collect 46ms, tests 43ms, environment 0ms, prepare 40ms)

% Coverage report from v8
------------------|---------|----------|---------|---------|--------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
------------------|---------|----------|---------|---------|--------------------
All files | 9.72 | 51.21 | 35.71 | 9.72 |
build | 0 | 0 | 0 | 0 |
main.js | 0 | 0 | 0 | 0 | 1-606
config | 0 | 0 | 0 | 0 |
vitest.ts | 0 | 0 | 0 | 0 | 1-16
source | 0 | 50 | 50 | 0 |
main.ts | 0 | 0 | 0 | 0 | 1-163
types.ts | 0 | 0 | 0 | 0 |
source/utilities | 30.56 | 54.05 | 40 | 30.56 |
cli.ts | 0 | 0 | 0 | 0 | 1-207
config.ts | 88.54 | 54.83 | 100 | 88.54 | ...116-121,125-126
http.ts | 0 | 0 | 0 | 0 | 1-43
logger.ts | 72.72 | 100 | 25 | 72.72 | 9,11,15
promise.ts | 100 | 100 | 100 | 100 |
server.ts | 0 | 0 | 0 | 0 | 1-206
------------------|---------|----------|---------|---------|--------------------

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow removal of a header

1 participant