@@ -6,13 +6,16 @@ import {
66 makeSelectRepos ,
77 makeSelectLocation ,
88} from '../selectors' ;
9+ import { ApplicationRootState } from '../../../types' ;
10+ import { Repo } from '../../RepoListItem/types' ;
911
1012describe ( 'selectGlobal' , ( ) => {
1113 it ( 'should select the global state' , ( ) => {
12- const globalState = { } as any ;
13- const mockedState : any = {
14+ const globalState = { } ;
15+ // tslint:disable-next-line:no-object-literal-type-assertion
16+ const mockedState = {
1417 global : globalState ,
15- } ;
18+ } as ApplicationRootState ;
1619 expect ( selectGlobal ( mockedState ) ) . toEqual ( globalState ) ;
1720 } ) ;
1821} ) ;
@@ -21,11 +24,12 @@ describe('makeSelectCurrentUser', () => {
2124 it ( 'should select the current user' , ( ) => {
2225 const currentUserSelector = makeSelectCurrentUser ( ) ;
2326 const username = 'mxstbr' ;
24- const mockedState : any = {
27+ // tslint:disable-next-line:no-object-literal-type-assertion
28+ const mockedState = {
2529 global : {
2630 currentUser : username ,
2731 } ,
28- } ;
32+ } as ApplicationRootState ;
2933 expect ( currentUserSelector ( mockedState ) ) . toEqual ( username ) ;
3034 } ) ;
3135} ) ;
@@ -59,15 +63,16 @@ describe('makeSelectError', () => {
5963describe ( 'makeSelectRepos' , ( ) => {
6064 it ( 'should select the repos' , ( ) => {
6165 const reposSelector = makeSelectRepos ( ) ;
62- const repositories : any [ ] = [ ] ;
63- const mockedState : any = {
66+ const repos : Repo [ ] = [ ] ;
67+ // tslint:disable-next-line:no-object-literal-type-assertion
68+ const mockedState = {
6469 global : {
6570 userData : {
66- repositories ,
71+ repos : repos ,
6772 } ,
6873 } ,
69- } ;
70- expect ( reposSelector ( mockedState ) ) . toEqual ( repositories ) ;
74+ } as ApplicationRootState ;
75+ expect ( reposSelector ( mockedState ) ) . toEqual ( repos ) ;
7176 } ) ;
7277} ) ;
7378
0 commit comments