-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: fix tslint errors regarding shadow variables
fix tslint errors regarding shadow variables
- Loading branch information
Showing
2 changed files
with
9 additions
and
9 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 |
---|---|---|
|
@@ -37,7 +37,7 @@ const SequenceActions = RestBindings.SequenceActions; | |
describe('JWT Authentication', () => { | ||
let app: Application; | ||
let server: RestServer; | ||
let users: UserRepository; | ||
let test_users: UserRepository; | ||
|
||
beforeEach(givenAServer); | ||
beforeEach(givenAuthenticatedSequence); | ||
|
@@ -87,19 +87,19 @@ describe('JWT Authentication', () => { | |
|
||
app.controller(InfoController); | ||
|
||
const token: string = (await whenIMakeRequestTo(server) | ||
const the_token: string = (await whenIMakeRequestTo(server) | ||
.get('/login') | ||
.expect(200)).text; | ||
|
||
expect(token).to.be.not.Null; | ||
expect(token).to.be.String; | ||
expect(the_token !== null).to.equal(true); | ||
expect(typeof the_token === 'string').to.equal(true); | ||
|
||
const email = (await whenIMakeRequestTo(server) | ||
.get('/whoAmI') | ||
.set('access_token', token) | ||
.set('access_token', the_token) | ||
.expect(200)).text; | ||
|
||
expect(email).to.equal(users.list['[email protected]'].user.email); | ||
expect(email).to.equal(test_users.list['[email protected]'].user.email); | ||
}); | ||
|
||
it('returns error due to expired token', async () => { | ||
|
@@ -363,7 +363,7 @@ describe('JWT Authentication', () => { | |
.bind(JWTAuthenticationStrategyBindings.TOKEN_SERVICE) | ||
.toClass(JWTService); | ||
|
||
users = new UserRepository({ | ||
test_users = new UserRepository({ | ||
'[email protected]': { | ||
user: { | ||
id: '1', | ||
|
@@ -402,7 +402,7 @@ describe('JWT Authentication', () => { | |
}, | ||
}); | ||
|
||
server.bind(USER_REPO).to(users); | ||
server.bind(USER_REPO).to(test_users); | ||
} | ||
|
||
function whenIMakeRequestTo(restServer: RestServer): Client { | ||
|
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