UNPKG

quickbuild

Version:

A mature, feature-complete application generator with an emphasis on speed

27 lines (24 loc) 621 B
import { selectHome, makeSelectUsername } from '../selectors'; describe('selectHome', () => { it('should select the home state', () => { const homeState = { userData: {}, }; const mockedState = { home: homeState, }; expect(selectHome(mockedState)).toEqual(homeState); }); }); describe('makeSelectUsername', () => { const usernameSelector = makeSelectUsername(); it('should select the username', () => { const username = 'mxstbr'; const mockedState = { home: { username, }, }; expect(usernameSelector(mockedState)).toEqual(username); }); });