rwa-trivia
rwa-trivia copied to clipboard
ng test Type errors
Attempted to run tests using npm test
or directly running ng test
but both on master result in type errors related to NGRX Store Payload and some additional errors related to exports.
ERROR in rwa-trivia/src/app/core/components/login/login.component.spec.ts (7,23): Module '"rwa-trivia/node_modules/angularfire2/index"' has no exported member 'AuthProviders'.
ERROR in rwa-trivia/src/app/core/components/login/login.component.spec.ts (7,38): Module '"rwa-trivia/node_modules/angularfire2/index"' has no exported member 'AuthMethods'.
ERROR in rwa-trivia/src/app/core/components/login/login.component.spec.ts (7,51): Module '"rwa-trivia/node_modules/angularfire2/index"' has no exported member 'FirebaseAuthConfig'.
.
.
.
ERROR in rwa-trivia/src/app/core/store/reducers/questions.reducer.spec.ts (135,27): Argument of type '{ "id": number; "questionText": string; "answers": { "id": number; "answerText": string; "correct...' is not assignable to parameter of type 'Expected<ArrayLike<Question>>'.
Type '{ "id": number; "questionText": string; "answers": { "id": number; "answerText": string; "correct...' is not assignable to type 'ObjectContaining<ArrayLike<Question>>'.
ERROR in rwa-trivia/src/app/core/store/reducers/questions.reducer.spec.ts (151,44): Argument of type '{ type: string; }' is not assignable to parameter of type 'ActionWithPayload<string>'.
Property 'payload' is missing in type '{ type: string; }'.
ERROR in rwa-trivia/src/app/core/store/reducers/questions.reducer.spec.ts (154,56): Argument of type '{ type: string; }' is not assignable to parameter of type 'ActionWithPayload<string>'.
Property 'payload' is missing in type '{ type: string; }'.
ERROR in rwa-trivia/src/app/core/store/reducers/user.reducer.spec.ts (35,35): Argument of type '{ type: string; }' is not assignable to parameter of type 'ActionWithPayload<User>'.
Property 'payload' is missing in type '{ type: string; }'.
ERROR in rwa-trivia/src/app/shared/components/questions/questions.component.spec.ts (38,5): Type '{ "id": number; "questionText": string; "answers": { "id": number; "answerText": string; "correct...' is not assignable to type 'Question[]'.
ERROR in rwa-trivia/src/app/shared/components/questions/questions.component.spec.ts (50,9): Type '{ "id": number; "questionText": string; "answers": { "id": number; "answerText": string; "correct...' is not assignable to type 'Question'.
ERROR in rwa-trivia/src/app/shared/components/questions/questions.component.spec.ts (52,5): Type '{ "id": number; "questionText": string; "answers": { "id": number; "answerText": string; "correct...' is not assignable to type 'Question[]'.
ERROR in rwa-trivia/src/app/shared/components/questions/questions.component.spec.ts (143,3): Type '{ "id": number; "questionText": string; "answers": { "id": number; "answerText": string; "correct...' is not assignable to type 'Question[]'.
.
.
.
unit tests are broken as they haven't been updated in a while. it'll take me some time to catch up on unit tests.