We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2ba6a0f commit 1612eabCopy full SHA for 1612eab
packages/react-router/modules/__tests__/Switch-test.js
@@ -121,4 +121,21 @@ describe('A <Switch>', () => {
121
expect(node.innerHTML).toNotContain('cup')
122
expect(node.innerHTML).toContain('bub')
123
})
124
+
125
+ it('handles comments', () => {
126
+ const node = document.createElement('div')
127
128
+ ReactDOM.render((
129
+ <MemoryRouter initialEntries={[ '/cupcakes' ]}>
130
+ <Switch>
131
+ <Route path="/bubblegum" render={() => <div>bub</div>}/>
132
+ {/* this is a comment */}
133
+ <Route path="/cupcakes" render={() => <div>cup</div>}/>
134
+ </Switch>
135
+ </MemoryRouter>
136
+ ), node)
137
138
+ expect(node.innerHTML).toNotContain('bub')
139
+ expect(node.innerHTML).toContain('cup')
140
+ })
141
0 commit comments