Skip to content

Commit 35edf5c

Browse files
committed
Updated code coverage tests
1 parent e3d535d commit 35edf5c

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

Tests/ReactBridgeTests/ReactBridgeTests.swift

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,27 @@ final class ReactPropertyTests: XCTestCase {
484484
)
485485
}
486486

487+
func test_no_type() {
488+
let diagnostic = DiagnosticSpec(message: ErrorMessage.varNoType(name: "a").message, line: 3, column: 7)
489+
490+
assertMacroExpansion(
491+
"""
492+
class View {
493+
@ReactProperty
494+
let a = 10
495+
}
496+
""",
497+
expandedSource:
498+
"""
499+
class View {
500+
let a = 10
501+
}
502+
""",
503+
diagnostics: [diagnostic],
504+
macros: macros
505+
)
506+
}
507+
487508
func test_multiple() {
488509
// SwiftSyntaxMacroExpansion
489510
enum MacroApplicationError: String {

0 commit comments

Comments
 (0)