Skip to content

Commit c007013

Browse files
committed
fix: continue if test was successful
1 parent 34e3b1b commit c007013

1 file changed

Lines changed: 6 additions & 10 deletions

File tree

crates/tests/src/main.rs

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,29 +51,25 @@ impl Testable for Case {
5151
"name": err.name,
5252
"message": err.message,
5353
});
54-
return CaseResult::Failure(input, json);
54+
if json != input.clone().expected_result {
55+
return CaseResult::Failure(input, json);
56+
}
5557
}
5658
taurus_core::context::signal::Signal::Success(value) => {
5759
let json = to_json_value(value);
58-
if json == input.clone().expected_result {
59-
return CaseResult::Success;
60-
} else {
60+
if json != input.clone().expected_result {
6161
return CaseResult::Failure(input, json);
6262
}
6363
}
6464
taurus_core::context::signal::Signal::Return(value) => {
6565
let json = to_json_value(value);
66-
if json == input.clone().expected_result {
67-
return CaseResult::Success;
68-
} else {
66+
if json != input.clone().expected_result {
6967
return CaseResult::Failure(input, json);
7068
}
7169
}
7270
taurus_core::context::signal::Signal::Respond(value) => {
7371
let json = to_json_value(value);
74-
if json == input.clone().expected_result {
75-
return CaseResult::Success;
76-
} else {
72+
if json != input.clone().expected_result {
7773
return CaseResult::Failure(input, json);
7874
}
7975
}

0 commit comments

Comments
 (0)