Skip to content

Commit

Permalink
Fix more failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
amazimbe committed Mar 6, 2025
1 parent 18a495b commit 9052b16
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion npm_and_yarn/spec/dependabot/npm_and_yarn/file_fetcher_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1375,6 +1375,12 @@
"bun.lock?ref=sha"
).with(headers: { "Authorization" => "token token" })
.to_return(status: 404)
stub_request(
:get,
"https://api.github.com/repos/gocardless/bump/contents/" \
"pnpm-workspace.yaml?ref=sha"
).with(headers: { "Authorization" => "token token" })
.to_return(status: 404)
end

it "fetches package.json from the workspace dependencies" do
Expand Down Expand Up @@ -1950,6 +1956,12 @@
"bun.lock?ref=sha"
).with(headers: { "Authorization" => "token token" })
.to_return(status: 404)
stub_request(
:get,
"https://api.github.com/repos/gocardless/bump/contents/" \
"pnpm-workspace.yaml?ref=sha"
).with(headers: { "Authorization" => "token token" })
.to_return(status: 404)
end

it "fetches package.json from the workspace dependencies" do
Expand Down Expand Up @@ -2199,6 +2211,7 @@
context "with both packageManager with version and valid engines fields (pnpm)" do
before do
Dependabot::Experiments.register(:enable_pnpm_yarn_dynamic_engine, true)
Dependabot::Experiments.register(:npm_fallback_version_above_v6, true)

allow(file_fetcher_instance).to receive(:commit).and_return("sha")

Expand All @@ -2213,7 +2226,7 @@
it "fetches package.json fine and pnpm version is picked from packageManager and not engines" do
expect(file_fetcher_instance.files.count).to eq(1)
expect(file_fetcher_instance.ecosystem_versions).to eq(
{ package_managers: { "pnpm" => "9.5.0" } }
{ package_managers: { "pnpm" => "8.9.0" } }
)
end
end
Expand Down

0 comments on commit 9052b16

Please sign in to comment.