'Running a simple test on cypress-ct
I'm trying to use cypress-ct to test react components. I have the following code in App.js
import {mount} from '@cypress/react'
import App from './App'
it('works', () => {
mount(<App />)
})
But when I run cypress-ct and open the test file I get a "No tests found." message. I've also tried with expect(true).to.be(true) and get the same message.
Solution 1:[1]
why would you put these code in your App.js
?
The code should be put in the right folder with the name App.test.js
(or App.spec.js
).
That's when the test would be found.
Hope this is helpful.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 |