mirror of
https://github.com/pnpm/pnpm.git
synced 2026-07-19 20:22:21 -04:00
refactor(tarball): move unit tests out of lib.rs into tests.rs
The inline mod tests block had grown to roughly 1290 lines, dwarfing
the production code in lib.rs and making the file hard to navigate.
Per CODE_STYLE_GUIDE.md ("Unit test file layout"), large unit-test
modules belong in an external file.
Extract the entire #[cfg(test)] mod tests { ... } block into a sibling
crates/tarball/src/tests.rs and reference it from lib.rs with the
standard:
#[cfg(test)]
mod tests;
This is pure motion — same 27 tests, same imports (use super::*; still
resolves to lib.rs), no behavior change. lib.rs shrinks from 2334 to
1045 lines.
Closes #307.
This commit is contained in:
committed by
Yagiz Nizipli
parent
8d45e70a8a
commit
676fe55306
File diff suppressed because it is too large
Load Diff
1276
pacquet/crates/tarball/src/tests.rs
Normal file
1276
pacquet/crates/tarball/src/tests.rs
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user