Skip to content

test: add 28 tests to improve coverage (92% → 93%)#1082

Merged
Boshen merged 1 commit into
mainfrom
improve-test-coverage
Mar 24, 2026
Merged

test: add 28 tests to improve coverage (92% → 93%)#1082
Boshen merged 1 commit into
mainfrom
improve-test-coverage

Conversation

@Boshen

@Boshen Boshen commented Mar 24, 2026

Copy link
Copy Markdown
Member

Summary

Coverage-driven test additions targeting the biggest gaps identified via cargo llvm-cov:

  • dts_resolver (74.6% → 80.3%): types field, hash imports (#), tsconfig paths, extension substitution (.mjs.mts, .json.d.json.ts, .tsx), self-referencing packages, typesVersions subpath, module type detection, error cases
  • modules (new file): custom module directories, absolute paths, priority ordering, fallback, empty list
  • error.rs (81.6% → 95.4%): CircularPathBufs and ConditionNames Display impls
  • scoped_packages: exports field resolution, subpath exports, not-found error
  • resolve: prefer_relative local-over-node_modules edge case
  • module_type: nested package.json type override, disabled option

🤖 Generated with Claude Code

Coverage-driven test additions targeting the biggest gaps:

- dts_resolver (74.6% → 80.3%): types field, hash imports, tsconfig
  paths, extension substitution (.mjs→.mts, .json→.d.json.ts, .tsx),
  self-ref packages, typesVersions subpath, module type, error cases
- modules (new): custom module directories, absolute paths, priority,
  fallback, empty list
- error.rs (81.6% → 95.4%): CircularPathBufs and ConditionNames Display
- scoped_packages: exports field, subpath exports, not-found error
- resolve: prefer_relative local-over-node_modules edge case
- module_type: nested package.json type override, disabled option

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented Mar 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.11%. Comparing base (5b9194f) to head (dd8c422).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1082      +/-   ##
==========================================
+ Coverage   92.10%   93.11%   +1.00%     
==========================================
  Files          21       21              
  Lines        4079     4079              
==========================================
+ Hits         3757     3798      +41     
+ Misses        322      281      -41     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@codspeed-hq

codspeed-hq Bot commented Mar 24, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 13 untouched benchmarks
⏩ 5 skipped benchmarks1


Comparing improve-test-coverage (dd8c422) with main (5b9194f)

Open in CodSpeed

Footnotes

  1. 5 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@Boshen Boshen merged commit a530d85 into main Mar 24, 2026
17 checks passed
@Boshen Boshen deleted the improve-test-coverage branch March 24, 2026 12:44
@Boshen Boshen mentioned this pull request Mar 24, 2026
Boshen added a commit that referenced this pull request May 25, 2026
## 🤖 New release

* `oxc_resolver`: 11.19.1 -> 11.19.2
* `oxc_resolver_napi`: 11.19.1 -> 11.19.2

<details><summary><i><b>Changelog</b></i></summary><p>

## `oxc_resolver`

<blockquote>

##
[11.19.2](v11.19.1...v11.19.2)
- 2026-05-25

### <!-- 1 -->🐛 Bug Fixes

- *(tsconfig)* apply later-wins semantics for extends array
([#1156](#1156)) (by
@Boshen)
- *(tsconfig)* walk past a tsconfig that doesn't claim the file
([#1154](#1154)) (by
@Boshen)
- *(tsconfig)* let project references take priority over their parent
([#1151](#1151)) (by
@Boshen)
- *(tsconfig)* resolve `rootDirs` against the config that declared them
([#1150](#1150)) (by
@Boshen)
- *(tsconfig)* resolve `baseUrl` / `paths` against the canonical
tsconfig path
([#1148](#1148)) (by
@Boshen)
- strip query fragments when calling `find_tsconfig`
([#1147](#1147)) (by
@Boshen)
- avoid panic in resolve_file for parentless paths
([#1053](#1053)) (by
@Boshen)
- *(dts)* strip ./ prefix from package entry when matching typesVersions
([#1051](#1051)) (by
@Boshen)
- *(dts)* expand Declaration to TypeScript|Declaration for package entry
resolution
([#1050](#1050)) (by
@Boshen)
- *(dts)* prefer declaration extensions over JS in exports-resolved
paths ([#1047](#1047))
(by @Boshen)
- avoid wasm/wasi dead-code lint in NodePath
([#1043](#1043)) (by
@Boshen)
- *(napi)* replace panics with error returns to prevent WASM traps
([#1055](#1055)) (by
@Boshen)

### <!-- 2 -->🚜 Refactor

- remove clear_cache test that dynamically creates fixtures (by @Boshen)
- move resolve and misc fixtures into fixtures/integration (by @Boshen)
- replace ignored doctest with link to example (by @Boshen)
- consolidate fixture directories for better test file mapping (by
@Boshen)
- replace `url` crate with `percent-encoding`
([#1065](#1065)) (by
@Boshen)

### <!-- 4 -->⚡ Performance

- *(cache)* pack CachedPathImpl::meta into a CachedMeta byte
([#1144](#1144)) (by
@Boshen)
- *(cache)* store canonical path as Box<Path> instead of PathBuf
([#1143](#1143)) (by
@Boshen)
- *(alias)* fast-reject alias entries by cached first byte
([#1142](#1142)) (by
@Boshen)

### <!-- 6 -->🧪 Testing

- *(tsconfig)* port lookup scenarios from typescript-go
([#1155](#1155)) (by
@Boshen)
- add 28 tests to improve coverage (92% → 93%)
([#1082](#1082)) (by
@Boshen)

### Contributors

* @Boshen
* @renovate[bot]
</blockquote>



</p></details>

---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).

Co-authored-by: oxc-guard[bot] <276638029+oxc-guard[bot]@users.noreply.github.com>
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.

1 participant