From fcf6e38f68c22c1f1bbdb5f0f900d46d202d85a1 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 29 Apr 2025 12:22:38 +0200 Subject: Add jsfuzz to npm dev-dependencies. --- docs/module/fuzzer.md | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'docs/module/fuzzer.md') diff --git a/docs/module/fuzzer.md b/docs/module/fuzzer.md index d576693..3b05e70 100644 --- a/docs/module/fuzzer.md +++ b/docs/module/fuzzer.md @@ -17,17 +17,28 @@ Crash dumps are written to the "fuzzer" directory. There are two fuzzers available: -A fuzzer that uses the "jsfuzz" package. +A simple fuzzer that plays completely randomly: + + rtt fuzz-rand TITLE + +A more advanced fuzzer that uses the "jsfuzz" package. With this fuzzer every title gets its own "fuzzer/corpus-title" sub-directory. The corpus helps the fuzzer find interesting game states in future runs. rtt fuzz TITLE -A simple fuzzer that plays completely randomly: +The fuzzer will run until you stop it or it has found too many errors. - rtt fuzz-rand TITLE +## Coverage -The fuzzer will run until you stop it or it has found too many errors. +Jsfuzz will generate a "nyc" coverage report that you can look at, +to see how much of your code has been tested: + + npx nyc coverage + +Or to generate an HTML report in "coverage": + + npx nyc report --reporter=html ## Debug -- cgit v1.2.3