We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9101989 + dd7f439 commit 88e7a26Copy full SHA for 88e7a26
option/json_test.go
@@ -64,3 +64,10 @@ func TestUnmarshalEmpty(t *testing.T) {
64
assert.Nil(t, err)
65
assert.True(t, value.MiddleName.IsNone())
66
}
67
+
68
+func TestUnmarshalError(t *testing.T) {
69
+ var number option.Option[int]
70
+ err := number.UnmarshalJSON([]byte("not a number"))
71
+ assert.NotNil(t, err)
72
+ assert.True(t, number.IsNone())
73
+}
0 commit comments