Skip to content

Commit

Permalink
set jest to --runInBand
Browse files Browse the repository at this point in the history
  • Loading branch information
AllStackDev1 committed Aug 6, 2024
1 parent 38d9243 commit 1ccf096
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const config: Config = {
coverageProvider: 'v8',
testEnvironment: 'node',
roots: ['<rootDir>'],
testTimeout: 15000,
testTimeout: 30000,
setupFilesAfterEnv: ['reflect-metadata'],
modulePaths: [compilerOptions.baseUrl],
coverageDirectory: './coverage',
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"db:create": "pnpm run build && NODE_ENV=development npx sequelize-cli db:create",
"db:migrate:up": "pnpm run build && NODE_ENV=development npx sequelize-cli db:migrate",
"db:migrate:undo": "pnpm run build && NODE_ENV=development npx sequelize-cli db:migrate:undo",
"test": "NODE_ENV=test TEST_MODEL=real jest",
"test:watch": "NODE_ENV=test TEST_MODEL=real jest --runInBand --watch .",
"test": "NODE_ENV=test TEST_MODEL=real jest --runInBand",
"test:watch": "NODE_ENV=test TEST_MODEL=real jest --runInBand --watch",
"lint": "eslint ./src/**/*"
},
"author": "Chinedu",
Expand Down
2 changes: 1 addition & 1 deletion src/tests/models/user.model.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { mockModel } from 'tests/test.model';

import { TEST_MODEL } from 'configs/env.config';

describe('UserModel Test', () => {
describe('User Model Test', () => {
let userModelMock: typeof UserModel;
const user = {
userType: '1',
Expand Down
2 changes: 1 addition & 1 deletion src/tests/repositories/user.repository.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe.only('User Repository Test', () => {
);
});

it('shows that an instance of UserModel exist', async () => {
it('shows that an instance of user model exist', async () => {
expect(userRepositoryMock).toBeDefined();
});

Expand Down

0 comments on commit 1ccf096

Please sign in to comment.