Skip to content

Commit 1483169

Browse files
authored
docs: update old ct example on why cypress page (cypress-io#4587)
1 parent d65d514 commit 1483169

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

content/guides/overview/why-cypress.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,12 +171,11 @@ it('adds todos', () => {
171171

172172
### Component
173173

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
175175
execute
176-
[component tests](/guides/core-concepts/testing-types#What-is-Component-Testing).
176+
[component tests](/guides/component-testing/writing-your-first-component-test).
177177

178178
```js
179-
import { mount } from '@cypress/react' // or @cypress/vue
180179
import TodoList from './components/TodoList'
181180

182181
it('contains the correct number of todos', () => {
@@ -185,7 +184,7 @@ it('contains the correct number of todos', () => {
185184
{ text: 'Learn Component Testing', id: 2 },
186185
]
187186

188-
mount(<TodoList todos={todos} />)
187+
cy.mount(<TodoList todos={todos} />)
189188
// the component starts running like a mini web app
190189
cy.get('[data-testid="todos"]').should('have.length', todos.length)
191190
})

0 commit comments

Comments
 (0)