From 4fbb856bee51f9cb702705869a73a511d6ccd480 Mon Sep 17 00:00:00 2001 From: Chris Hendrix Date: Fri, 14 Jul 2023 16:18:56 -0400 Subject: [PATCH] update packages and move jest --- package.json | 34 ++++++++++++++-------------- {jest => test/jest}/api.user.test.ts | 2 +- {jest => test/jest}/jest.config.ts | 2 +- {jest => test}/utils.ts | 0 4 files changed, 19 insertions(+), 19 deletions(-) rename {jest => test/jest}/api.user.test.ts (95%) rename {jest => test/jest}/jest.config.ts (92%) rename {jest => test}/utils.ts (100%) diff --git a/package.json b/package.json index bf83da4..0617749 100644 --- a/package.json +++ b/package.json @@ -11,37 +11,37 @@ "up": "docker-compose -f docker-compose.yml up -d && docker-compose logs -f", "down": "docker-compose -f docker-compose.yml down", "devup": "next dev && npm run up", - "jest": "NODE_ENV=test jest --config=jest/jest.config.ts --runInBand --forceExit" + "jest": "NODE_ENV=test jest --config=test/jest/jest.config.ts --runInBand --forceExit" }, "dependencies": { "@next-auth/prisma-adapter": "^1.0.7", - "@prisma/client": "^4.16.2", + "@prisma/client": "^5.0.0", "@reduxjs/toolkit": "^1.9.5", "@types/bcrypt": "^5.0.0", - "@types/jest": "^29.5.2", - "@types/node": "^20.3.3", - "@types/react": "^18.2.14", - "@types/react-dom": "^18.2.6", + "@types/jest": "^29.5.3", + "@types/node": "^20.4.2", + "@types/react": "^18.2.15", + "@types/react-dom": "^18.2.7", "@types/validator": "^13.7.17", - "@typescript-eslint/eslint-plugin": "^5.60.1", - "@typescript-eslint/parser": "^5.60.1", + "@typescript-eslint/eslint-plugin": "^6.0.0", + "@typescript-eslint/parser": "^6.0.0", "autoprefixer": "10.4.14", "bcrypt": "^5.1.0", - "daisyui": "^3.1.7", - "eslint": "^8.44.0", + "daisyui": "^3.2.1", + "eslint": "^8.45.0", "eslint-config-airbnb-base": "^15.0.0", - "eslint-config-airbnb-typescript": "^17.0.0", - "eslint-config-next": "^13.4.7", - "jest": "^29.5.0", - "next": "^13.4.7", + "eslint-config-airbnb-typescript": "^17.1.0", + "eslint-config-next": "^13.4.10", + "jest": "^29.6.1", + "next": "^13.4.10", "next-auth": "^4.22.1", - "postcss": "^8.4.24", - "prisma": "^4.16.2", + "postcss": "^8.4.26", + "prisma": "^5.0.0", "react": "^18.2.0", "react-dom": "^18.2.0", "react-hook-form": "^7.45.1", "react-redux": "^8.1.1", - "tailwindcss": "3.3.2", + "tailwindcss": "3.3.3", "ts-jest": "^29.1.1", "ts-node": "^10.9.1", "typescript": "^5.1.6", diff --git a/jest/api.user.test.ts b/test/jest/api.user.test.ts similarity index 95% rename from jest/api.user.test.ts rename to test/jest/api.user.test.ts index c4f6ab5..08f4320 100644 --- a/jest/api.user.test.ts +++ b/test/jest/api.user.test.ts @@ -1,5 +1,5 @@ /* eslint-disable no-underscore-dangle */ -import { Api, Cleaner } from './utils' +import { Api, Cleaner } from '../utils' describe('/api/users', () => { const usersApi = new Api('/api/users') diff --git a/jest/jest.config.ts b/test/jest/jest.config.ts similarity index 92% rename from jest/jest.config.ts rename to test/jest/jest.config.ts index 96cd9ef..9aa6392 100644 --- a/jest/jest.config.ts +++ b/test/jest/jest.config.ts @@ -1,6 +1,6 @@ const jestConfig = { preset: 'ts-jest', - rootDir: '../', + rootDir: '../../', verbose: true, testEnvironment: 'node', transform: { '^.+\\.ts?$': 'ts-jest' }, diff --git a/jest/utils.ts b/test/utils.ts similarity index 100% rename from jest/utils.ts rename to test/utils.ts