File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -171,12 +171,11 @@ it('adds todos', () => {
171
171
172
172
### Component
173
173
174
- You can also use Cypress to mount components from some web frameworks and
174
+ You can also use Cypress to mount components from supported web frameworks and
175
175
execute
176
- [ component tests] ( /guides/core-concepts/ testing-types#What-is-Component-Testing ) .
176
+ [ component tests] ( /guides/component- testing/writing-your-first-component-test ) .
177
177
178
178
``` js
179
- import { mount } from ' @cypress/react' // or @cypress/vue
180
179
import TodoList from ' ./components/TodoList'
181
180
182
181
it (' contains the correct number of todos' , () => {
@@ -185,7 +184,7 @@ it('contains the correct number of todos', () => {
185
184
{ text: ' Learn Component Testing' , id: 2 },
186
185
]
187
186
188
- mount (< TodoList todos= {todos} / > )
187
+ cy . mount (< TodoList todos= {todos} / > )
189
188
// the component starts running like a mini web app
190
189
cy .get (' [data-testid="todos"]' ).should (' have.length' , todos .length )
191
190
})
You can’t perform that action at this time.
0 commit comments