Skip to content

Commit

Permalink
(chore) partial migration to jest
Browse files Browse the repository at this point in the history
  • Loading branch information
thehighestprimenumber committed Sep 6, 2024
1 parent 9a18536 commit 27ba6d6
Show file tree
Hide file tree
Showing 20 changed files with 1,482 additions and 524 deletions.
2 changes: 1 addition & 1 deletion app/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ const config: JestConfigWithTsJest = {
// "**/__tests__/**/*.[jt]s?(x)",
// "**/?(*.)+(spec|test).[tj]s?(x)"
// ],

testMatch: ["**/?(*.)+(jest).[tj]s?(x)"],
// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
// testPathIgnorePatterns: [
// "/node_modules/"
Expand Down
2 changes: 1 addition & 1 deletion app/jest.setup.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import "@/util/big_int_json.ts";
import "@/util/big_int_json";
117 changes: 82 additions & 35 deletions app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"start": "next start",
"lint": "next lint",
"test": "npm run api:test & npm run e2e:test",
"api:test": "glob -c \"tsx --no-warnings --test\" \"./tests/**/*.test.ts\"",
"api:test": "glob -c \"tsx --no-warnings --test\" \"./tests/**/*.test.ts\" & npm run jest",
"e2e:test": "npx playwright test",
"e2e:debug": "playwright test --debug",
"e2e:test:head": "npx playwright test -- --headed",
Expand All @@ -25,7 +25,7 @@
"db:gen-migration": "sequelize-cli migration:generate --name",
"db:gen-seed": "sequelize-cli seed:generate --name",
"sync-catalogue": "tsx scripts/catalogue-sync.ts",
"ci:test": "tsx --test --experimental-test-coverage --test-reporter=lcov --test-reporter-destination=lcov.info tests/**/*.test.ts",
"ci:test": "tsx --test --experimental-test-coverage --test-reporter=lcov --test-reporter-destination=lcov.info tests/**/*.test.ts & npm run jest",
"prettier": "npx prettier . --write",
"email": "email dev --dir src/lib/emails",
"create-admin": "tsx scripts/create-admin.ts"
Expand Down Expand Up @@ -122,7 +122,7 @@
"sequelize-auto": "^0.8.8",
"start-server-and-test": "^2.0.3",
"storybook": "^8.2.7",
"ts-jest": "^29.1.2",
"ts-jest": "^29.2.5",
"ts-node": "^10.9.2",
"tsx": "^4.7.0"
},
Expand Down
2 changes: 0 additions & 2 deletions app/src/util/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ import { db } from "@/models";
import { ValidationError } from "sequelize";
import { ManualInputValidationError } from "@/lib/custom-errors/manual-input-error";

import "@/util/big_int_json.ts";

export type ApiResponse = NextResponse | StreamingTextResponse;

export type NextHandler = (
Expand Down
Loading

0 comments on commit 27ba6d6

Please sign in to comment.