Skip to content

Commit

Permalink
refactor: optimising space of merge prefix based tests by deleting re…
Browse files Browse the repository at this point in the history
…dundant values
  • Loading branch information
Varun0157 committed May 28, 2024
1 parent 598564d commit 5979a2b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/mergeData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,11 @@ function mergePrefixBasedTests(tests: RawTests) {
for (const key of Object.keys(tests)) {
if (key.startsWith("$.")) {
tests.json[key] = tests[key];
delete tests[key];
} else if (key.startsWith("$h.")) {
const headerName = key.replace(/^\$h\./, "");
tests.headers[headerName] = tests[key];
delete tests[key];
}
}
}
Expand Down

0 comments on commit 5979a2b

Please sign in to comment.