added additional check on error message in negative test case

This commit is contained in:
anshul sharma
2025-04-29 13:53:38 +05:30
parent 2a32343e07
commit 98dfe65fd4
+4
View File
@@ -134,5 +134,9 @@ func TestHCL2Formatter_FormatNegativeCases(t *testing.T) {
if tc.errExpected && !diags.HasErrors() {
t.Fatalf("Expected error but got none")
}
if diags[0].Detail != "file testdata/format/test.json is not a HCL file" {
t.Fatalf("Expected error messge did not received")
}
}
}