-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes Yarn Dependabot::SharedHelpers::HelperSubprocessFailed issues
- Loading branch information
1 parent
7835cbd
commit dc7b8d2
Showing
2 changed files
with
30 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -741,6 +741,31 @@ | |
end | ||
end | ||
|
||
context "when the error message contains variation of Couldn't find package error" do | ||
let(:error_message) do | ||
"Couldn't find package \"source-map-explorer\" on the \"npm\" registry." | ||
end | ||
|
||
it "raises the corresponding error class with the correct message" do | ||
expect { error_handler.handle_group_patterns(error, usage_error_message, { yarn_lock: yarn_lock }) } | ||
.to raise_error(Dependabot::DependencyFileNotResolvable, | ||
"Couldn't find package \"source-map-explorer\" on the \"npm\" registry.") | ||
end | ||
end | ||
|
||
context "when the error message contains variation of Couldn't find package error" do | ||
let(:error_message) do | ||
"Couldn't find package \"dl-core-js@^1.0.0\" required by \"[email protected]\" on the \"npm\" registry." | ||
end | ||
|
||
it "raises the corresponding error class with the correct message" do | ||
expect { error_handler.handle_group_patterns(error, usage_error_message, { yarn_lock: yarn_lock }) } | ||
.to raise_error(Dependabot::DependencyFileNotResolvable, | ||
"Couldn't find package \"dl-core-js@^1.0.0\" required" \ | ||
" by \"[email protected]\" on the \"npm\" registry.") | ||
end | ||
end | ||
|
||
context "when the error message contains YARNRC_ENV_NOT_FOUND" do | ||
let(:error_message) do | ||
"Usage Error: Environment variable not found (GITHUB_TOKEN) in [38;5;170m/home/dependabot/dependabot-" \ | ||
|