Skip to content

Commit

Permalink
rearrange test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
rrozek committed Apr 18, 2024
1 parent 2571812 commit 2b31c40
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 6 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ To get started with the dashboard builder server, follow these steps:

1. **Clone the Repository**: `git clone https://github.com/tokenguardio/dashboard-creator-server.git`
2. **Install Dependencies**: `npm install` or `yarn install`
3. **Run the Development Server**: `npm start` or `yarn start`
3. **Run the Development Server**: `npm start` or `yarn start`

### Testing
1. **Run tests**: `npm test`

### Features

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import httpMocks from 'node-mocks-http';
import { Response, Request, NextFunction } from 'express';

import config from '@config/config';
import apiKey from './apiKey.middleware';
import apiKey from '../core/middlewares/apiKey.middleware';

describe('ApiKey middleware', () => {
test('should call next middleware in the stack if provided correct api key in the headers', () => {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import httpStatus from 'http-status';
import { jest } from '@jest/globals';
import app from '@app';

import mockData from './mocks/dashboardData.json';
import queryResponses from './mocks/queryResponses.json';
import mockData from '../components/db-api/mocks/dashboardData.json';
import queryResponses from '../components/db-api/mocks/queryResponses.json';

jest.mock('axios');
const mockedAxios = axios as jest.Mocked<typeof axios>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import httpStatus from 'http-status';
import { Response } from 'express';

import errorHandler from '@core/utils/errorHandler';
import errorHandling from './errorHandling.middleware';
import errorHandling from '../core/middlewares/errorHandling.middleware';

describe('Error middleware', () => {
test('should delegate error to the centralized error handler and send 500 response', () => {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Response, Request } from 'express';
import Joi from 'joi';
import { ValidationSchema } from '@core/interfaces/validationSchema';
import AppError from '@core/utils/appError';
import validate from './validate.middleware';
import validate from '../core/middlewares/validate.middleware';

// example validation schema for node request with provided all three options to valid
const validationSchemaWithAllOptions: ValidationSchema = {
Expand Down

0 comments on commit 2b31c40

Please sign in to comment.