more tests things

This commit is contained in:
nora 2022-02-10 06:55:07 +01:00
parent a7dba08990
commit 1cb4e21691
14 changed files with 98 additions and 40 deletions

View file

@ -1,17 +1,21 @@
use crate::project_root;
use anyhow::{bail, Result};
use anyhow::{bail, Context, Result};
use std::process::Command;
pub fn main() -> Result<()> {
let test_js_root = project_root().join("tests-js");
let status = Command::new("yarn").current_dir(&test_js_root).status()?;
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()?;
.status()
.context("yarn test tests")?;
if !status.success() {
bail!("yarn tests failed");
}