Skip to content

Commit

Permalink
fix: check on word instead of line
Browse files Browse the repository at this point in the history
  • Loading branch information
McPatate committed Nov 9, 2023
1 parent 74b6ebb commit 275697a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crates/testbed/src/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use std::{path::Path, process::Stdio};
use anyhow::anyhow;
use serde::{Deserialize, Serialize};
use tokio::{io::AsyncReadExt, process::Command};
use tracing::debug;

use crate::parse_env;

Expand Down Expand Up @@ -185,7 +186,7 @@ async fn jest_runner(
for word in words {
if word.contains("passed") {
passed = prev.parse::<u32>()? as f32;
} else if line.contains("failed") {
} else if word.contains("failed") {
failed = prev.parse::<u32>()? as f32;
}
prev = word;
Expand Down Expand Up @@ -241,7 +242,7 @@ async fn vitest_runner(
for word in words {
if word.contains("passed") {
passed = prev.parse::<u32>()? as f32;
} else if line.contains("failed") {
} else if word.contains("failed") {
failed = prev.parse::<u32>()? as f32;
}
prev = word;
Expand Down

0 comments on commit 275697a

Please sign in to comment.