Skip to content

Commit

Permalink
chore: add --watch option for just test
Browse files Browse the repository at this point in the history
  • Loading branch information
nokazn committed Feb 16, 2024
1 parent 4a5f4bb commit 7606bea
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
3 changes: 2 additions & 1 deletion dprint.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"toml": {
},
"excludes": [
"**/*-lock.json"
"**/*-lock.json",
"target"
],
"plugins": [
"https://plugins.dprint.dev/json-0.19.1.wasm",
Expand Down
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
rustc
rustfmt
rustPackages.clippy
cargo-watch
pre-commit
nixpkgs-fmt
just
Expand Down
8 changes: 6 additions & 2 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,12 @@ fmt-dprint *flags:
lint:
cargo clippy

test:
cargo test --locked --frozen --all-features -- --nocapture
test watch="":
if [[ "{{watch}}" == "--watch" ]]; then \
cargo watch -x 'test --locked --frozen --all-features -- --nocapture'; \
else \
cargo test --locked --frozen --all-features -- --nocapture; \
fi

build:
cargo build

0 comments on commit 7606bea

Please sign in to comment.