Skip to content

Commit 258679c

Browse files
Update tests for proto3 to let implicit members be optional but not nullable
1 parent 94bfbbc commit 258679c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/cli.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ tape.test("with --null-semantics, optional fields are handled correctly in proto
227227
test.ok(jsCode.includes("@member {number|null} c"), "Member for c should be nullable")
228228
test.ok(jsCode.includes("OptionalFields.prototype.c = null;"), "Initializer for c should be null")
229229

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

0 commit comments

Comments
 (0)