您好,我如何将 ES6 与 Jest 一起使用。因为他们在传播(运营商)和出口方面向我发送了错误。如何修改笑话?
export default function reducer(state={
open:false
}, action) {
switch (action.type) {
case "HANDLE_TAP_HOME": {
return {...state,open:action.open}
}
}
return state
}
测试
import base from '../../client/src/redux/reducer/reducers/Admin/base/Index'
describe('request to Reducer',()=>{
it('fetch',()=>{
expect(base(undefiend,{type:'nothing'})).toEqual({
open:false
})
})
})