add a coverage rule
authorLaurent Mazet <mazet@softndesign.org>
Wed, 22 Jul 2026 16:16:22 +0000 (18:16 +0200)
committerLaurent Mazet <mazet@softndesign.org>
Tue, 11 Aug 2026 20:26:29 +0000 (22:26 +0200)
test/Makefile

index de2ed4c71354b015fe7af12841a68c049c65386f..6dbc1c4727d6d19f44919c041a39587c879a620c 100644 (file)
@@ -8,8 +8,6 @@ STRESS_CONCURRENCY ?= 25
 STRESS_DURATION_MS ?= 15000
 START_SERVER ?= true
 
-.PHONY: help test test-http test-state test-realtime test-persistence test-stress-style stress stress-mixed-http stress-http-burst stress-sequential-game-ops test-external test-http-external test-state-external test-realtime-external test-persistence-external test-stress-style-external stress-external stress-mixed-http-external stress-http-burst-external stress-sequential-game-ops-external
-
 help:
        @echo make -C test test                           : run validation suite with auto-started server
        @echo make -C test test-http                      : run HTTP validation section
@@ -32,6 +30,13 @@ help:
        @echo make -C test stress-http-burst-external     : run hello burst stress section externally
        @echo make -C test stress-sequential-game-ops-external : run sequential game-ops stress section externally
 
+clean:
+       touch clean
+       rm -f clean $(wildcard games.backup.*.json)
+
+coverage:
+       NODE="nyc $(NODE)" make test
+
 test:
        TRIVABBLE_TEST_HOST=$(HOST) \
        TRIVABBLE_TEST_PORT=$(TEST_PORT) \
@@ -156,6 +161,4 @@ stress-sequential-game-ops-external:
        TRIVABBLE_START_SERVER=false \
        $(NODE) stress-sequential-game-ops.js
 
-clean:
-       touch clean
-       rm -f clean $(wildcard games.backup.*.json)
+.PHONY: clean coverage help test test-http test-state test-realtime test-persistence test-stress-style stress stress-mixed-http stress-http-burst stress-sequential-game-ops test-external test-http-external test-state-external test-realtime-external test-persistence-external test-stress-style-external stress-external stress-mixed-http-external stress-http-burst-external stress-sequential-game-ops-external