Skip to content

Commit

Permalink
Update tests for proto3 to let implicit members be optional but not n…
Browse files Browse the repository at this point in the history
…ullable
  • Loading branch information
martin-traverse committed Jul 26, 2024
1 parent 94bfbbc commit 258679c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ tape.test("with --null-semantics, optional fields are handled correctly in proto
test.ok(jsCode.includes("@member {number|null} c"), "Member for c should be nullable")
test.ok(jsCode.includes("OptionalFields.prototype.c = null;"), "Initializer for c should be null")

test.ok(jsCode.includes("@property {number} d OptionalFields d"), "Property for d should not be nullable")
test.ok(jsCode.includes("@property {number|undefined} [d] OptionalFields d"), "Property for d should be optional but not nullable")
test.ok(jsCode.includes("@member {number} d"), "Member for d should not be nullable")
test.ok(jsCode.includes("OptionalFields.prototype.d = 0;"), "Initializer for d should be zero")

Expand Down

0 comments on commit 258679c

Please sign in to comment.