Skip to content

Commit db0673c

Browse files
committed
chore: change option void value to be null
chore: update option void value to null
1 parent 2b85422 commit db0673c

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

test/e2e/src/test-custom-types.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ describe("Custom Types Tests", function () {
247247
expect(response.result).to.equal(1);
248248

249249
response = await this.context.client.option({ option: undefined });
250-
expect(response.result).to.equal(undefined);
250+
expect(response.result).to.equal(null);
251251
// this is the behavior we probably want, but fails
252252
// t.deepEqual(await t.context.client.option(), undefined) // typing and implementation require the object
253253
// t.deepEqual((await t.context.client.option({})).result, undefined) // typing requires argument; implementation would be fine with this

test/unit/spec/contract_spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -243,16 +243,16 @@ describe("Can round trip custom types", function () {
243243

244244
it("option", () => {
245245
roundtrip("option", 1);
246-
roundtrip("option", undefined);
246+
roundtrip("option", null);
247247

248248
roundtrip("option_struct", { a: 0, b: true, c: "hello" });
249-
roundtrip("option_struct", undefined);
249+
roundtrip("option_struct", null);
250250

251251
roundtrip("option_option_struct", { a: 0, b: true, c: "hello" });
252-
roundtrip("option_option_struct", undefined);
252+
roundtrip("option_option_struct", null);
253253

254254
roundtrip("option_vec_struct", [{ a: 0, b: true, c: "hello" }]);
255-
roundtrip("option_vec_struct", undefined);
255+
roundtrip("option_vec_struct", null);
256256
});
257257

258258
it("u256", () => {

0 commit comments

Comments
 (0)