mirror of
https://github.com/Noratrieb/haesli.git
synced 2026-01-14 11:45:02 +01:00
24 lines
613 B
Rust
24 lines
613 B
Rust
use crate::project_root;
|
|
use anyhow::{bail, Context, Result};
|
|
use std::process::Command;
|
|
|
|
pub fn main() -> Result<()> {
|
|
let test_js_root = project_root().join("test-js");
|
|
let status = Command::new("yarn")
|
|
.current_dir(&test_js_root)
|
|
.status()
|
|
.context("yarn install tests")?;
|
|
if !status.success() {
|
|
bail!("yarn install failed");
|
|
}
|
|
let status = Command::new("yarn")
|
|
.arg("test")
|
|
.current_dir(&test_js_root)
|
|
.status()
|
|
.context("yarn test tests")?;
|
|
if !status.success() {
|
|
bail!("yarn tests failed");
|
|
}
|
|
|
|
Ok(())
|
|
}
|