Skip to content
This repository was archived by the owner on Mar 5, 2022. It is now read-only.

Commit 9fc4520

Browse files
authored
add issue example but fixed (#173)
1 parent fefa5c5 commit 9fc4520

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import React from 'react'
2+
import { mount } from 'cypress-react-unit-test'
3+
import MyComponent from './my-component.jsx'
4+
5+
// example from https://github.com/bahmutov/cypress-react-unit-test/issues/172
6+
it('is a test', () => {
7+
mount(<MyComponent name="some text" />)
8+
cy.contains('Hello').should('be.visible')
9+
})
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import React from 'react'
2+
3+
class MyComponent extends React.Component {
4+
state = {}
5+
render() {
6+
return <div>Hello</div>
7+
}
8+
}
9+
10+
export default MyComponent

0 commit comments

Comments
 (0)