Skip to content

Commit

Permalink
move tests in separate folder
Browse files Browse the repository at this point in the history
  • Loading branch information
AmauryD committed Sep 9, 2022
1 parent 56e432a commit 53fbb6d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
"prepublish": "pnpm run test && pnpm run build"
},
"files": [
"dist/index.d.ts",
"dist/index.js"
"dist/src"
],
"keywords": [
"validation",
Expand All @@ -33,8 +32,8 @@
"typescript",
"decorators"
],
"main": "dist/index.js",
"types": "dist/index.d.ts",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
"devDependencies": {
"@types/jest": "^29.0.0",
"@types/node": "^18.7.3",
Expand Down Expand Up @@ -66,7 +65,7 @@
"^.+\\.(ts|tsx)$": "ts-jest"
},
"testMatch": [
"**/*.spec.(ts|js)"
"**/*.test.(ts|js)"
],
"testPathIgnorePatterns": [
"<rootDir>/dist/"
Expand Down
6 changes: 3 additions & 3 deletions src/index.spec.ts → tests/validator.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import {
Custom
} from "../src/index";
import type { ValidationError } from "fastest-validator";
import { COMPILE_KEY } from "./constants";
import { validate } from "./utils/validate";
import { validateOrReject } from "./utils/validate-or-reject";
import { COMPILE_KEY } from "../src/constants";
import { validate } from "../src/utils/validate";
import { validateOrReject } from "../src/utils/validate-or-reject";

describe("Schema", () => {
it("Should default to not strict", () => {
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"outDir": "dist",
"rootDir": "src",
"rootDir": ".",
"esModuleInterop": true,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
Expand Down

0 comments on commit 53fbb6d

Please sign in to comment.