Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,34 @@ At first sight this may still seem very limiting, and if you write very imperati
- Write a helper function if you find yourself repeating code. That's what functions are for, after all. You can even write a helper function to generate tests.
- If you're still struggling, make an issue on GitHub or bring it up in Discord. We'll either figure out a good way to do it with what we already have, or realize that something actually is missing and add it.

## Running your tests

To run your tests with dune, add a rule stanza in a dune file:

```clojure
(rule
(alias jest)
(action
(run npx jest)))
```

Configure jest to find the compiled jest tests. For example, you could include a jest.config.js file in your projects's root with contents:

```
module.exports = {
rootDir: "./_build/default/",
testMatch: ["**/*_test.js"],
testEnvironment: "node",
};
```

Now run the tests with:

```sh
dune build @jest
```


## Documentation

For the moment, please refer to [Jest.mli](./jest/jest.mli).
Expand Down