Closed doutori closed 4 years ago
/* eslint-env jest */ import { GET_SAMPLE, UPDATE_SAMPLE } from '~/constant'; import { sampleActions } from '~/actions'; import { SampleState } from '~/stateTypes'; describe('Sample actions', () => { it('should create get sample action', () => { const expectedAction = { type: GET_SAMPLE }; expect(sampleActions.getSample()).toEqual(expectedAction); }); it('should create update sample action', () => { const expectedPayload: SampleState = { value: 'hoge', }; const expectedAction = { type: UPDATE_SAMPLE, payload: { value: expectedPayload.value, } }; expect(sampleActions.updateSample(expectedPayload)).toEqual( expectedAction ); }); });
+++ import * as sampleActions from './sample'; import * as accountActions from './account'; import * as counterActions from './counter'; // eslint-disable-next-line export { +++ sampleActions, accountActions, counterActions, };
Todo
Generated Code Samples
Added file
actions/sample/sample.test.ts
Updated (+++ lines are added)
actions/index.ts