Skip to content
Merged
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
41 changes: 39 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,49 @@ These functions will follow symbolic links unless you pass in `{:nofollow-links
Some babashka.fs functions accept the `:follow-links` option.
These function will _not_ follow symbolic links unless you pass in `{:follow-links true}`.

## Test
## Test & Dev

``` clojure
To run all tests
```
$ bb test-all
```

### Default Tests
To run default tests only:
```
bb test
```
You can also use [cognitect test-runner](https://github.com/cognitect-labs/test-runner?tab=readme-ov-file#invoke-with-clojure--m-clojuremain) options, for example, to run a single test:
```
bb test --var babashka.fs-test/walk-test
```

To fire up a REPL when working on these tests, run `bb dev`.

### Scratch CWD Tests
We setup a separate task for tests that need/prefer to be run from a scratch current working directory.
To run these tests only:
```
bb test-cwd
```
As above, cognitect test-runner options work:
```
bb test-cwd --var babashka.fs-cwd-test/es-copy-test
```

The scratch current working directory is `target/test-cwd`.
To fire up a REPL for these tests, run `bb dev-cwd`.
Note that the `.nrepl-port` file will be generated under `target/test-cwd/`, so you'll have to type the REPL port in manually when connecting.

> [!NOTE]
> We currently have 2 REPL launcher tasks, `dev` and `dev-cwd`, because they each rely on a different current working directory.

### API Docs
This project generates API docs with quickdoc, to regenerate `API.md`:
```
shell quickdoc
```

## License

Copyright © 2020-2025 Michiel Borkent
Expand Down