Testing redux state/context/graphql queries and mutations using react-cosmos
Closed this issue · 4 comments
jeznag commented
Talk Date
Don't mind
Talk Title
Testing redux state/context/graphql queries and mutations using react-cosmos
Length
20 mins
Twitter-sized Overview (140 characters)
When testing your connected components, do you do the old
export class MyUnconnectedComponent
...
export default connect(...)(MyUnconnectedComponent)
trick? There is a better way using react-cosmos.
Detailed Overview
react-cosmos allows you easily create:
- a mock redux store
- mock context
- mock Apollo queries/mutations
It means that your component tests can test the component in its true environment instead of pretending that mapStateToProps
doesn't exist.
jesstelford commented
This is a great talk idea - We'd love to have you give it!
Are you available for our April 1st event?
jeznag commented
Yup!
jesstelford commented
Locked in 👍
We'll get you up first on the evening, at around 6:30pm. Come say hi at 6:00-ish so we can do an A/V test and quick run-through before we start.
jeznag commented
Great see you then.