forked from apollographql/fullstack-tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Stephen Barlow
committed
Nov 30, 2020
1 parent
9e5d931
commit 37d0368
Showing
4 changed files
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -97,7 +97,7 @@ describe('[Mutation.login]', () => { | |
|
||
it('returns base64 encoded email as user token if successful', async () => { | ||
const args = { email: '[email protected]' }; | ||
const base64Email = new Buffer(mockContext.user.email).toString('base64'); | ||
const base64Email = Buffer.from(mockContext.user.email).toString('base64'); | ||
findOrCreateUser.mockReturnValueOnce({ token: base64Email }); | ||
|
||
// check the resolver response | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -98,7 +98,7 @@ describe('[Mutation.login]', () => { | |
it('returns base64 encoded email if successful', async () => { | ||
const args = { email: '[email protected]' }; | ||
findOrCreateUser.mockReturnValueOnce(true); | ||
const base64Email = new Buffer(mockContext.user.email).toString('base64'); | ||
const base64Email = Buffer.from(mockContext.user.email).toString('base64'); | ||
|
||
// check the resolver response | ||
const res = await resolvers.Mutation.login(null, args, mockContext); | ||
|