docs(fuzz): add sync explaination

This commit is contained in:
hulkoba 2023-12-13 10:55:40 +01:00
parent 1f3b58db91
commit c10da44df2
No known key found for this signature in database
GPG Key ID: ACB6C4A3A4F2BE2F

View File

@ -45,6 +45,13 @@ TARGET=createMessageBinary npm run fuzz-coverage
The coverage reports can be found in `test/fuzz/coverage`.
_Note:_ The output will tell you that using `--sync` might be useful:
> Exclusively observed synchronous return values from fuzzed function. Fuzzing in synchronous mode seems beneficial!
To enable it, append a `--sync` to your Jazzer.js invocation.
But, [be careful](https://github.com/CodeIntelligenceTesting/jazzer.js/blob/main/docs/fuzz-targets.md#synchronous-execution).
It **may only be used for entirely synchronous code** and it is not fully compatible with callbacks, that are used in the tests.
## The fuzz target module
All functions that need to be fuzz-tested are here, at the `test/fuzz/` directory.