Reputation: 1499
This is a very noob question with an easy answer I'm sure.
I have an angular project which has a service spec test that makes use of Amplify, for example:
it(`should gracefully fail to log in`, fakeAsync(() => {
spyOn(Amplify.Auth, 'signIn').and.returnValue(new Promise((resolve, reject) => {
reject({message: 'simulated login error'});
}));
This spec test belongs to a component I copied from another project and have not updated.
I have no issue with my local build, etc but when pushing to Kite, my pipeline fails with the following error:
src/app/services/login/login.service.spec.ts(648,20): error TS2304: Cannot find name 'Amplify'.
I am unsure how to resolve this issue.
I have tried running an npm install @aws-amplify/auth
command in the application folder and then pushed the package and package-lock but the pipeline still fails.
Is there something obvious I have missed?
Upvotes: 0
Views: 379
Reputation: 1499
As expected, a very simple solution (you can tell I'm new to front-end)
Required the following import:
import { Amplify } from 'aws-amplify';
Upvotes: 1