feature-change-applier/src/reducers/stateReducer.results.test.js

25 lines
579 B
JavaScript
Raw Normal View History

import {stateReducer, initState} from './stateReducer';
describe('Results', () => {
let state = {};
beforeEach(()=> {
state = {};
})
it('results returned unaltered', () => {
const action = {type: ''};
expect(stateReducer(state, action)).toBe(state);
});
it('results returned from first sound change rule', () => {
const action = {type: 'RUN'};
state = initState(0)
expect(stateReducer(state, action).results).toEqual({
pass: 'epoch 1',
results: [
'anna', 'anat', 'anət', 'anna', 'tan', 'ənna'
]
})
});
});