Commit 9d97da1
committed
test: fail e2e tests when accuracy is 0%
Add error handling to domain classification, PII detection, and jailbreak
detection tests to ensure they fail explicitly when accuracy is 0%.
Previously, these tests would return nil (success) even when all test cases
failed, which could mask critical issues. Now they return a descriptive error
when correctTests == 0, making test failures more visible and actionable.
Signed-off-by: bitliu <[email protected]>1 parent 6a4ebf4 commit 9d97da1
File tree
3 files changed
+15
-0
lines changed- e2e/testcases
3 files changed
+15
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
95 | 100 | | |
96 | 101 | | |
97 | 102 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
106 | 111 | | |
107 | 112 | | |
108 | 113 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
106 | 111 | | |
107 | 112 | | |
108 | 113 | | |
| |||
0 commit comments