Testing
Structuring the app
import { IConfig } from 'overmind'
import { state } from './state'
export const config = {
state
}import { createOvermind } from 'overmind'
import { config } from './overmind'
const overmind = createOvermind(config)Testing actions
export const getPost = async ({ state, api }, id) {
state.isLoadingPost = true
try {
state.currentPost = await api.getPost(id)
} catch (error) {
state.error = error
}
state.isLoadingPost = false
}Testing onInitialize
Testing effects
Last updated