Skip to content
This repository was archived by the owner on Mar 5, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions cypress/component/basic/use-render/my-component-spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import React from 'react'
import { mount } from 'cypress-react-unit-test'
import MyComponent from './my-component.jsx'

// example from https://github.com/bahmutov/cypress-react-unit-test/issues/172
it('is a test', () => {
mount(<MyComponent name="some text" />)
cy.contains('Hello').should('be.visible')
})
10 changes: 10 additions & 0 deletions cypress/component/basic/use-render/my-component.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React from 'react'

class MyComponent extends React.Component {
state = {}
render() {
return <div>Hello</div>
}
}

export default MyComponent