Skip to content

Commit

Permalink
CHANE TEST DIRECTORY
Browse files Browse the repository at this point in the history
  • Loading branch information
ViLiFYKiNG committed Jul 7, 2024
1 parent 3a02853 commit bf52795
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 29 deletions.
2 changes: 1 addition & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sonar.projectName=OMFO-MOMO

sonar.sources=src

sonar.tests=src/tests
sonar.tests=tests

sonar.exclusions=**/node_modules/**/*, **/dist/**/*, **/build/**/*, **/migration/**/*

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { DataSource } from 'typeorm';
import request from 'supertest';
import createJWKSMock from 'mock-jwks';
import { AppDataSource } from '../../config/data-source';
import { ROLES } from '../../constants';
import app from '../../app';
import { Tenant } from '../../entity/Tenant';
import app from '../../src/app';
import { AppDataSource } from '../../src/config/data-source';
import { ROLES } from '../../src/constants';
import { Tenant } from '../../src/entity/Tenant';

describe('POST /tenants', () => {
let connection: DataSource;
Expand Down
10 changes: 5 additions & 5 deletions src/tests/users/create.spec.ts → tests/users/create.spec.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { DataSource } from 'typeorm';
import request from 'supertest';
import createJWKSMock from 'mock-jwks';
import { AppDataSource } from '../../config/data-source';
import { Tenant } from '../../entity/Tenant';
import { ROLES } from '../../constants';
import app from '../../app';
import { User } from '../../entity/User';
import { createTenant } from '../utils';
import app from '../../src/app';
import { AppDataSource } from '../../src/config/data-source';
import { ROLES } from '../../src/constants';
import { Tenant } from '../../src/entity/Tenant';
import { User } from '../../src/entity/User';

describe('POST /users', () => {
let connection: DataSource;
Expand Down
10 changes: 5 additions & 5 deletions src/tests/users/login.spec.ts → tests/users/login.spec.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { DataSource } from 'typeorm';
import { AppDataSource } from '../../config/data-source';
import { ROLES } from '../../constants';
import { User } from '../../entity/User';
import request from 'supertest';
import app from '../../app';
import { isJWT } from '../utils';
import bcrypt from 'bcrypt';
import request from 'supertest';
import { AppDataSource } from '../../src/config/data-source';
import { ROLES } from '../../src/constants';
import { User } from '../../src/entity/User';
import app from '../../src/app';

describe('POST /auth/login', () => {
let connection: DataSource;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import request from 'supertest';
import app from '../../app';
import app from '../../src/app';
import { DataSource } from 'typeorm';
import { AppDataSource } from '../../config/data-source';
import { User } from '../../entity/User';
import logger from '../../config/logger';
import { ROLES } from '../../constants';
import { AppDataSource } from '../../src/config/data-source';
import { User } from '../../src/entity/User';
import logger from '../../src/config/logger';
import { ROLES } from '../../src/constants';
import { isJWT } from '../utils';
import { RefreshToken } from '../../entity/RefreshToken';
import { RefreshToken } from '../../src/entity/RefreshToken';
describe('POST /auth/register', () => {
let connection: DataSource;

Expand Down
8 changes: 4 additions & 4 deletions src/tests/users/user.spec.ts → tests/users/user.spec.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { DataSource } from 'typeorm';
import { AppDataSource } from '../../config/data-source';
import request from 'supertest';
import app from '../../app';
import { User } from '../../entity/User';
import { ROLES } from '../../constants';
import createJWKSMock from 'mock-jwks';
import { AppDataSource } from '../../src/config/data-source';
import app from '../../src/app';
import { ROLES } from '../../src/constants';
import { User } from '../../src/entity/User';

describe('GET /auth/self', () => {
let connection: DataSource;
Expand Down
2 changes: 1 addition & 1 deletion src/tests/utils/index.ts → tests/utils/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DataSource, Repository } from 'typeorm';
import { Tenant } from '../../entity/Tenant';
import { Tenant } from '../../src/entity/Tenant';

export const truncateTables = async (connection: DataSource) => {
const entities = connection.entityMetadatas;
Expand Down
6 changes: 3 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
"target": "es2016",
"lib": ["es6"],
"module": "commonjs",
"rootDir": "./src",
"outDir": "./dist/src",
"rootDir": "./",
"outDir": "./dist",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"skipLibCheck": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"strictPropertyInitialization": false
},
"exclude": ["**/*.spec.ts", "src/tests"]
"exclude": ["**/*.spec.ts", "tests"]
}

0 comments on commit bf52795

Please sign in to comment.