test(alias): add unit tests for compileAliasOptions bucketing and onl… - #628
test(alias): add unit tests for compileAliasOptions bucketing and onl…#628hey-amanthakur wants to merge 3 commits into
Conversation
…yModule flag - compileAliasOptions: verify bucket construction by first char code, useBuckets logic (disabled for single-char or empty-prefix wildcard), wildcard prefix/suffix splitting, absolutePath, and empty input - onlyModule flag: verify relative paths and path-prefixed requests are skipped when onlyModule is true, and that both are aliased when false
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #628 +/- ##
=======================================
Coverage 98.11% 98.11%
=======================================
Files 49 49
Lines 10010 10010
=======================================
Hits 9821 9821
Misses 189 189
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Merging this PR will degrade performance by 76.29%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | Memory | extensions-many: 6-extension list (warm) |
1.9 KB | 101.9 KB | -98.15% |
| ❌ | Memory | unsafe-cache-miss-heavy: 1 miss pass + 1 hit pass |
5 KB | 6.2 KB | -19.65% |
| ❌ | Memory | unsafe-cache: ON, 3x repeat |
2.3 KB | 2.5 KB | -10.12% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing hey-amanthakur:test/alias-utils-coverage (559a87d) with main (24c3521)
Add @ts-expect-error for stubResolver usage and extract Map.get() results into temp variables to fix possibly-undefined type errors.
|
Lint failed |
|
@alexander-akait have fixed the linting issue, It could be due to new type.d.ts has not been generated. |
compileAliasOptions: verify bucket construction by first char code, useBuckets logic (disabled for single-char or empty-prefix wildcard), wildcard prefix/suffix splitting, absolutePath, and empty input
onlyModule flag: verify relative paths and path-prefixed requests are skipped when onlyModule is true, and that both are aliased when false