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()
|
||||
|
||||
const userInfo = {
|
||||
username: 'test@user.com',
|
||||
username: `test${process.env.JEST_WORKER_ID}@user.com`,
|
||||
firstName: 'test',
|
||||
lastName: 'test',
|
||||
}
|
||||
|
||||
@ -55,7 +55,7 @@ describe('user', () => {
|
||||
const response = await t
|
||||
.get('/users/emails/:email', {
|
||||
params: {
|
||||
email: 'test@user.com',
|
||||
email: test.username,
|
||||
},
|
||||
})
|
||||
.expect(200)
|
||||
|
||||
@ -5,7 +5,7 @@ describe('UserService', () => {
|
||||
|
||||
test.withDatabase()
|
||||
|
||||
const username = 'test@user.com'
|
||||
const username = test.username
|
||||
const password = '1234567890'
|
||||
|
||||
const userService = new UserService(test.db)
|
||||
|
||||
@ -11,7 +11,7 @@ import {RequestTester} from './RequestTester'
|
||||
import {Role} from '../entities/Role'
|
||||
|
||||
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 app: express.Application
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user