Generation should not run every cargo test. I only want to generation to run when I provide the env variables to configure the generation, such as where I want the output to go. Generation should be more explicit, we could use a rust flag e.g. RUSTFLAGS='--cfg ts_rs' cargo test. All that would need to change, is that the generated tests would need to be annotated with #[cfg(ts_rs)]. E.g.
#[cfg(ts_rs)]
#[cfg(test)]
#[test]
fn export_bindings_alignmentinteraction() {
let cfg = ::ts_rs::Config::from_env();
<AlignmentInteraction as ::ts_rs::TS>::export_all(&cfg).expect("could not export type");
}
Now cargo test does not run these.
Generation should not run every
cargo test. I only want to generation to run when I provide the env variables to configure the generation, such as where I want the output to go. Generation should be more explicit, we could use a rust flag e.g.RUSTFLAGS='--cfg ts_rs' cargo test. All that would need to change, is that the generated tests would need to be annotated with#[cfg(ts_rs)]. E.g.Now
cargo testdoes not run these.