Subject: [bug#74900] [PATCH v2 4/6] build-system/node: Use test-target argument.

From: Nicolas Graves <[email-masked]>
Date: Tue, 18 Feb 2025 00:43:55 +0100

* guix/build/node-build-system.scm (check): Use test-target argument.
---
 guix/build/node-build-system.scm | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/guix/build/node-build-system.scm b/guix/build/node-build-system.scm
index ea23d92a05..9967069458 100644
--- a/guix/build/node-build-system.scm
+++ b/guix/build/node-build-system.scm
@@ -319,13 +319,12 @@ (define* (build #:key inputs #:allow-other-keys)
         (format #t "there is no build script to run~%"))
     #t))
 
-(define* (check #:key tests? inputs #:allow-other-keys)
-  "Run 'npm test' if TESTS?"
+(define* (check #:key tests? inputs test-target #:allow-other-keys)
+  "Run 'npm run TEST-TARGET' if TESTS?"
   (if tests?
       (let ((npm (string-append (assoc-ref inputs "node") "/bin/npm")))
-        (invoke npm "test"))
-      (format #t "test suite not run~%"))
-  #t)
+        (invoke npm "run" test-target))
+      (format #t "test suite not run~%")))
 
 (define* (repack #:key inputs #:allow-other-keys)
   (invoke "tar"
-- 
2.48.1