Skip to content

Commit 1def059

Browse files
committed
use shared error assertion for module policy pattern validation
1 parent 5582f2d commit 1def059

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

vibes/modules_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -975,9 +975,7 @@ func TestModulePolicyPatternValidation(t *testing.T) {
975975
ModulePaths: []string{filepath.Join("testdata", "modules")},
976976
ModuleAllowList: []string{"[invalid"},
977977
})
978-
if err == nil || !strings.Contains(err.Error(), "invalid module allow-list pattern") {
979-
t.Fatalf("expected invalid allow-list pattern error, got %v", err)
980-
}
978+
requireErrorContains(t, err, "invalid module allow-list pattern")
981979
}
982980

983981
func TestFormatModuleCycleUsesConciseChain(t *testing.T) {

0 commit comments

Comments
 (0)