Skip to content

Commit 470adb3

Browse files
committed
docs: fix typo and explain FuzzedDataProvider in Jest documentation
1 parent 63a893b commit 470adb3

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

docs/jest-integration.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ which can be specified through the CLI client.
8787
}
8888
```
8989

90-
## Writing a Jest fuzz tests
90+
## Writing a Jest fuzz test
9191

9292
To create a fuzz test, the `fuzz` function on Jest's `test` and `it` can be
9393
used.
@@ -116,9 +116,11 @@ describe("My describe", () => {
116116
});
117117
```
118118

119-
However, the provided `Buffer` is not the nicest abstraction to work with. For
120-
that reason, Jazzer.js provides the wrapper class `FuzzedDataProvider`. An
121-
example on how to use everything in combination is shown below.
119+
If the function you want to test expects parameters of types other than
120+
`Buffer`, you have to take care of constructing the corresponding arguments from
121+
the provided buffer. To facilitate this step, Jazzer.js provides a utility class
122+
`FuzzedDataProvider` that you can use to consume data of certain types from the
123+
fuzzer input. An example on how to use everything in combination is shown below.
122124

123125
```js
124126
const target = require("./target");

0 commit comments

Comments
 (0)