Skip to content

Commit a437337

Browse files
committed
refactor: reorder tests
1 parent 87fe264 commit a437337

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

jest.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { Config } from '@jest/types';
33
const config: Config.InitialOptions = {
44
preset: 'ts-jest',
55
testEnvironment: 'node',
6-
testMatch: ['<rootDir>/tests/**/*.spec.ts'],
6+
testMatch: ['<rootDir>/**/*.spec.ts'],
77
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
88
transform: {
99
'^.+\\.tsx?$': 'ts-jest',

tests/metrics.controller.spec.ts renamed to src/metrics/metrics.controller.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Test, TestingModule } from '@nestjs/testing';
22
import { Registry, Counter } from 'prom-client';
3-
import { MetricsController } from '../src';
3+
import { MetricsController } from '../index';
44

55
describe( 'MetricsController', () => {
66
let controller: MetricsController;

tests/metrics.service.spec.ts renamed to src/metrics/metrics.service.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Test, TestingModule } from '@nestjs/testing';
2-
import { MetricsService } from '../src';
2+
import { MetricsService } from '../index';
33
import { Registry, Pushgateway } from 'prom-client';
4-
import { CONFIG_OPTIONS } from '../src/constants';
4+
import { CONFIG_OPTIONS } from '../constants';
55

66
const mockPushAdd = jest.fn().mockResolvedValue( undefined );
77

tests/reporter.module.spec.ts renamed to src/reporter/reporter.module.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Test, TestingModule } from '@nestjs/testing';
22
import { Registry } from 'prom-client';
3-
import { MetricsService, ReporterModule, ReporterService } from '../src';
3+
import { MetricsService, ReporterModule, ReporterService } from '../index';
44

55
describe( 'ReporterModule', () => {
66
let module: TestingModule;

tests/reporter.service.spec.ts renamed to src/reporter/reporter.service.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { Test, TestingModule } from '@nestjs/testing';
2-
import { ReporterService } from '../src';
3-
import { MetricsService } from '../src';
2+
import { ReporterService } from '../index';
3+
import { MetricsService } from '../index';
44
import { Registry } from 'prom-client';
55
import { Logger } from '@nestjs/common';
6-
import { CONFIG_OPTIONS } from '../src/constants';
6+
import { CONFIG_OPTIONS } from '../constants';
77

88
describe( 'ReporterService', () => {
99
let registry: Registry;

0 commit comments

Comments
 (0)