Skip to content

Commit 6bdcd87

Browse files
committed
use shared call helper for integration run checks
1 parent 7c9200c commit 6bdcd87

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

vibes/integration_test.go

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -521,10 +521,7 @@ func TestYieldErrorCases(t *testing.T) {
521521
requireCallErrorContains(t, script, "yield_without_block", nil, CallOptions{}, "no block given")
522522

523523
// run function should work since it uses blocks correctly
524-
val, err := script.Call(context.Background(), "run", nil, CallOptions{})
525-
if err != nil {
526-
t.Fatalf("run: unexpected error: %v", err)
527-
}
524+
val := callScript(t, context.Background(), script, "run", nil, CallOptions{})
528525
assertValueEqual(t, val, hashVal(map[string]Value{
529526
"count": intVal(3),
530527
}))
@@ -537,10 +534,7 @@ func TestArgumentErrorCases(t *testing.T) {
537534
requireCallErrorContains(t, script, "too_many_args", nil, CallOptions{}, "argument")
538535

539536
// run function should work
540-
val, err := script.Call(context.Background(), "run", nil, CallOptions{})
541-
if err != nil {
542-
t.Fatalf("run: unexpected error: %v", err)
543-
}
537+
val := callScript(t, context.Background(), script, "run", nil, CallOptions{})
544538
if val.Kind() != KindHash {
545539
t.Fatalf("run: expected hash, got %v", val.Kind())
546540
}

0 commit comments

Comments
 (0)