Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('should update `options.reducers` if call defaults multiple times', () => {
defaults({
reducers: {
a: () => 'a'
}
})
expect(Object.keys(options.reducers)).toEqual(['a'])
const container = document.createElement('div')
render(<div>, container)
expect(store.getState().a).toBe('a')
defaults({
reducers: {
b: () => 'b'
}
})
expect(Object.keys(options.reducers)).toEqual(['a', 'b'])
render()
expect(store.getState().b).toBe('b')
})</div>
reducers: {
a: () => 'a'
}
})
expect(Object.keys(options.reducers)).toEqual(['a'])
const container = document.createElement('div')
render(<div>, container)
expect(store.getState().a).toBe('a')
defaults({
reducers: {
b: () => 'b'
}
})
expect(Object.keys(options.reducers)).toEqual(['a', 'b'])
render()
expect(store.getState().b).toBe('b')
})
</div>