Skip to content

Commit b0c2b01

Browse files
Update assertion to expect null on an undefined option
1 parent a41f513 commit b0c2b01

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

cmd/crates/soroban-spec-typescript/ts-tests/src/test-custom-types.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,9 @@ test('tuple', async t => {
162162
})
163163

164164
test('option', async t => {
165-
// this makes sense
166165
t.deepEqual((await contract.option({ option: 1 })).result, 1)
167166

168-
// this passes but shouldn't
169-
t.deepEqual((await contract.option({ option: undefined })).result, undefined)
167+
t.deepEqual((await contract.option({ option: undefined })).result, null)
170168

171169
// this is the behavior we probably want, but fails
172170
// t.deepEqual(await contract.option(), undefined) // typing and implementation require the object

0 commit comments

Comments
 (0)