Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
SoonIter committed Oct 21, 2024
1 parent f0e5f6c commit b5e56ef
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
3 changes: 2 additions & 1 deletion fixtures/pnpm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"ipaddr.js": "2.2.0",
"postcss": "8.4.33",
"styled-components": "6.1.1",
"mathjs": "13.2.0"
"mathjs": "13.2.0",
"decimal.js": "10.4.3"
}
}
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions tests/resolve_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,11 @@ fn ipaddr_js() {
}

#[test]
fn mathjs() {
fn decimal_js() {
let dir = dir();
let path = dir.join("fixtures/pnpm");
let module_path =
dir.join("node_modules/.pnpm/[email protected]/node_modules/mathjs/lib/esm/index.js");
dir.join("node_modules/.pnpm/[email protected]/node_modules/decimal.js/decimal.mjs");

let resolvers = [
// with `extension_alias`
Expand All @@ -153,14 +153,14 @@ fn mathjs() {
];

for resolver in resolvers {
let resolution = resolver.resolve(&path, "mathjs").map(|r| r.full_path());
let resolution = resolver.resolve(&path, "decimal.js").map(|r| r.full_path());
assert_eq!(resolution, Ok(module_path.clone()));
}
}

// resolve decimal.js
#[test]
fn decimal_js() {
fn decimal_js_from_mathjs() {
let dir = dir();
let path = dir.join("node_modules/.pnpm/[email protected]/node_modules/mathjs/lib/esm");
let module_path =
Expand Down

0 comments on commit b5e56ef

Please sign in to comment.