We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 771be40 commit bb00c25Copy full SHA for bb00c25
provider/formtype_test.go
@@ -235,7 +235,7 @@ func TestValidateFormType(t *testing.T) {
235
},
236
}
237
238
- t.Run("TabledTests", func(t *testing.T) {
+ passed := t.Run("TabledTests", func(t *testing.T) {
239
// TabledCases runs through all the manual test cases
240
for _, c := range cases {
241
t.Run(c.name, func(t *testing.T) {
@@ -251,6 +251,12 @@ func TestValidateFormType(t *testing.T) {
251
252
})
253
254
+ if !passed {
255
+ // Do not run additional tests and pollute the output
256
+ t.Log("Tests failed, will not run the assumed error cases")
257
+ return
258
+ }
259
+
260
// AssumeErrorCases assumes any uncovered test will return an error.
261
// This ensures all valid test case paths are covered.
262
t.Run("AssumeErrorCases", func(t *testing.T) {
0 commit comments