bigbuffet-rw/app/soapbox/reducers/__tests__/height_cache-test.js

18 lines
533 B
JavaScript
Raw Normal View History

2020-06-09 18:08:07 -07:00
import reducer from '../height_cache';
import { Map as ImmutableMap } from 'immutable';
import { HEIGHT_CACHE_CLEAR } from '../height_cache';
2020-06-09 18:08:07 -07:00
describe('height_cache reducer', () => {
it('should return the initial state', () => {
expect(reducer(undefined, {})).toEqual(ImmutableMap());
});
it('should handle HEIGHT_CACHE_CLEAR', () => {
const state = ImmutableMap({ is_uploading: true });
const action = {
type: HEIGHT_CACHE_CLEAR,
};
expect(reducer(undefined, {})).toEqual(ImmutableMap());
})
2020-06-09 18:08:07 -07:00
});