Skip to content

Latest commit

 

History

History
59 lines (38 loc) · 1.44 KB

CONTRIBUTING.md

File metadata and controls

59 lines (38 loc) · 1.44 KB

Contributing to savvy

(Still work in progress...)

Testing

savvy crate

As savvy framework requires a real R session to work, cargo test doesn't work. Instead, please use savvy-cli test. This extracts test code and creates a temporary R package on-the-fly to run these tests.

savvy-cli test .

if you want to use the dev version of savvy-cli, you can run cargo r-test, which is an alias of cargo run --manifest-path ./savvy-cli/Cargo.toml -- test.

The binary of [savvy-cli] is found on the GitHub Releases. You can also install it via cargo install.

Currently, it also requires

  • R is on PATH
  • [pkgbuild R package][pkgbuild] is installed

R package for testing

R-package/ directory contains the R package for testing. You can run devtools::check() on the directory.

savvy-macro crate

savvy-macro uses insta for snapshot testing. Please install cargo-insta first. The installation guide can be found on the official Getting Started.

If you create a new snapshot or modify an existing snapshot, you can review and accept the changes with:

cargo insta review

savvy-bindgen crate

You can just run cargo test.

cargo test --manifest-path=./savvy-bindgen/Cargo.toml