Skip to content
This repository was archived by the owner on Apr 9, 2025. It is now read-only.

Conversation

@neilfulwiler
Copy link
Contributor

I know this looks a bit silly but hear me out..

I was looking at #278 and wanted to know how much I should trust the fact that all the tests pass on a given PR. So I made a small change to CategoryDropdown (changed "import { data } from 'custom/category'" to "import data from 'custom/category'"). The app failed to start at that point, but all the tests passed.

This test will just catch basic things like that? maybe valuable?

Also Enzyme seems to be preferred way to test react apps these days? Not sure if anyone here has experience

@munroTom
Copy link
Contributor

Yeah that seems fair enough to me, I don't have much experience with enzyme testing, I've got a little more with cypress which may also be good to have to act as documentation of user flows through the app potentially?

@sebastianovide
Copy link
Contributor

@neilfulwiler @munroTom , happy to merge ?

@neilfulwiler
Copy link
Contributor Author

@munroTom cypress looks really cool but I think it's at a different layer. It seems to be targeting e2e testing (which would be awesome), whereas enzyme is specifically for dealing with small parts of a react component hierarchy (enzyme.shallow()) for example lets you spin up the component without worrying that it will load downstream components that might break (ie enzyme is react unit-testing, cypress is full website e2e/integration testing, so both are valuable)

@neilfulwiler neilfulwiler force-pushed the test-category-dropdown branch from 126a47c to c81d358 Compare March 12, 2020 08:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants