Skip to content

Commit

Permalink
Add missing test coverage for coerceValue errors in SetInternalField
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanahsmith committed Oct 18, 2021
1 parent d064e79 commit da656e5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion object_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,12 @@ func TestObjectInternalFields(t *testing.T) {
t.Errorf("unexpected value: %q", v)
}

obj.SetInternalField(0, "baz")
if err := obj.SetInternalField(0, t); err == nil {
t.Error("expected unsupported value error")
}

err = obj.SetInternalField(0, "baz")
fatalIf(t, err)
if v := obj.GetInternalField(0); v.String() != "baz" {
t.Errorf("unexpected value: %q", v)
}
Expand Down

0 comments on commit da656e5

Please sign in to comment.