Use process.env.JEST_WORKER_ID when creating username
This commit is contained in:
parent
1762dad4d1
commit
040af18765
@ -14,7 +14,7 @@ describe('passport.promise', () => {
|
|||||||
app = express()
|
app = express()
|
||||||
|
|
||||||
const userInfo = {
|
const userInfo = {
|
||||||
username: 'test@user.com',
|
username: `test${process.env.JEST_WORKER_ID}@user.com`,
|
||||||
firstName: 'test',
|
firstName: 'test',
|
||||||
lastName: 'test',
|
lastName: 'test',
|
||||||
}
|
}
|
||||||
|
|||||||
@ -55,7 +55,7 @@ describe('user', () => {
|
|||||||
const response = await t
|
const response = await t
|
||||||
.get('/users/emails/:email', {
|
.get('/users/emails/:email', {
|
||||||
params: {
|
params: {
|
||||||
email: 'test@user.com',
|
email: test.username,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.expect(200)
|
.expect(200)
|
||||||
|
|||||||
@ -5,7 +5,7 @@ describe('UserService', () => {
|
|||||||
|
|
||||||
test.withDatabase()
|
test.withDatabase()
|
||||||
|
|
||||||
const username = 'test@user.com'
|
const username = test.username
|
||||||
const password = '1234567890'
|
const password = '1234567890'
|
||||||
|
|
||||||
const userService = new UserService(test.db)
|
const userService = new UserService(test.db)
|
||||||
|
|||||||
@ -11,7 +11,7 @@ import {RequestTester} from './RequestTester'
|
|||||||
import {Role} from '../entities/Role'
|
import {Role} from '../entities/Role'
|
||||||
|
|
||||||
export class TestUtils<T extends IRoutes> {
|
export class TestUtils<T extends IRoutes> {
|
||||||
readonly username = 'test@user.com'
|
readonly username = `test${process.env.JEST_WORKER_ID}@user.com`
|
||||||
readonly password = 'Password10'
|
readonly password = 'Password10'
|
||||||
|
|
||||||
readonly app: express.Application
|
readonly app: express.Application
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user