Skip to content

Commit

Permalink
Merge pull request aws-amplify#379 from buggy/fix-broken-test
Browse files Browse the repository at this point in the history
Fix the broken test in aws-amplify/__tests__/Auth/auth-unit-test.ts
  • Loading branch information
mlabieniec authored Feb 28, 2018
2 parents 88aa54b + c2f8e40 commit 1035954
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/aws-amplify/__tests__/Auth/auth-unit-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1119,6 +1119,11 @@ describe('auth unit test', () => {
return user;
});
const spyon2 = jest.spyOn(CognitoUser.prototype, "signOut");
// @ts-ignore
const spyon3 = jest.spyOn(Auth.prototype, "setCredentialsFromSession")
.mockImplementationOnce(() => {
return;
});

await auth.signOut();

Expand All @@ -1128,6 +1133,7 @@ describe('auth unit test', () => {
spyonAuth.mockClear();
spyon.mockClear();
spyon2.mockClear();
spyon3.mockClear();
});

test('no UserPool', async () => {
Expand Down

0 comments on commit 1035954

Please sign in to comment.