8000 fix: can't run tests in projectdo without `npm` installed by alanpearce · Pull Request #25 · paldepind/projectdo · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: can't run tests in projectdo without npm installed #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions projectdo
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,8 @@ try_build_script() {
# End of list of tools

detect_and_run() {
try_justfile
try_makefile
try_nodejs
try_cargo
try_stack
Expand All @@ -373,8 +375,6 @@ detect_and_run() {
try_cmake
try_maven
try_lein
try_justfile
try_makefile
try_nix_flake
try_nix_package
try_python
Expand Down
4 changes: 4 additions & 0 deletions run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,10 @@ if describe "make"; then
do_test_in "make-check-with-check-file-and-target"; assert
assertEqual "$RUN_RESULT" "make check"
fi
if it "finds check target despite package.json"; then
do_test_in "make-with-npm"; assert
assertEqual "$RUN_RESULT" "make check"
fi
fi

if describe "nix-flake"; then
Expand Down
2 changes: 2 additions & 0 deletions tests/make-with-npm/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
check:
@echo "Tests passed."
7095
7 changes: 7 additions & 0 deletions tests/make-with-npm/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "echo \"Error: no build specified\" && exit 1",
"start": "echo \"Error: no start specified\" && exit 1"
}
}
0