Skip to content

Commit

Permalink
feat: update packages
Browse files Browse the repository at this point in the history
feat: mocha->jest

checkpoint 2

checkpoint 3

checkpoint 3

checkpoint 4

checkpoint 6

feat: login route working

test: finish

fix: package audit

fix: jest config
  • Loading branch information
AndrewHanasiro committed Aug 25, 2024
1 parent 6324120 commit 3945968
Show file tree
Hide file tree
Showing 77 changed files with 10,302 additions and 6,276 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
!/test
!.eslintignore
!.eslintrc.js
!.mocharc.json
!.npmrc
!.prettierrc
!commitlint.config.json
!jest.config.js
!nodemon.json
!package-lock.json
!package.json
Expand Down
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:@typescript-eslint/recommended",
"plugin:sonarjs/recommended"
"plugin:sonarjs/recommended-legacy"
],
"settings": {
"import/resolver": {
Expand Down
6 changes: 0 additions & 6 deletions .mocharc.json

This file was deleted.

2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v20.9.0
v20.12.0
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*
!*.ts
!*.json
!*/
!*/
!*.js
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
FROM node:20.9.0-alpine3.18 AS dependency
FROM node:20.12.0-alpine3.18 AS dependency
WORKDIR /app
COPY . .
RUN npm ci

FROM node:20.9.0-alpine3.18 AS builder
FROM node:20.12.0-alpine3.18 AS builder
WORKDIR /app
COPY . .
COPY --from=dependency /app/node_modules ./node_modules
RUN npm run build

FROM node:20.9.0-alpine3.18 AS deploy
FROM node:20.12.0-alpine3.18 AS deploy
WORKDIR /app
COPY --from=dependency /app/node_modules ./node_modules
COPY --from=builder /app/build ./build
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ make infra/up # already create tables based on ./db/migration folder
make infra/down # does not remove volume

# make test on the same condition where it's executed on CI
make test
make ci

# developer and test enviroment
make dev
Expand Down
12 changes: 12 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
testMatch: ['**/test/(unit|integration)/**/*.test.ts'],
collectCoverage: true,
coverageReporters: ['cobertura', 'lcov', 'text'],
coverageDirectory: 'coverage',
maxConcurrency: 1,
maxWorkers: 1,
clearMocks: true,
}
12 changes: 6 additions & 6 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ start:
docker compose exec -T api npm run build
docker compose exec -d api npm start

.PHONY: test
test:
make infra/up
docker compose exec -T api npm ci
docker compose exec -T api npm test
make clean/docker
.PHONY: ci
ci:
npm run lint:check
npm run format:check
npm run build:check
npm test

.PHONY: test/mutation
test/mutation:
Expand Down
Loading

0 comments on commit 3945968

Please sign in to comment.