Skip to content

Commit

Permalink
Setup tests
Browse files Browse the repository at this point in the history
  • Loading branch information
isaldin committed Jan 14, 2020
1 parent 2cf8b43 commit bc7c629
Show file tree
Hide file tree
Showing 5 changed files with 8,923 additions and 45 deletions.
13 changes: 13 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
testEnvironment: "node",
testPathIgnorePatterns: ["/node_modules/"],
coveragePathIgnorePatterns: ["/node_modules/"],
transform: {
"^.+\\.(ts|tsx)$": "ts-jest"
},

rootDir: "./src",
moduleNameMapper: {
"^@app/(.*)$": "<rootDir>/src/$1"
}
};
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"main": "src/index.ts",
"license": "MIT",
"scripts": {
"dev": "nodemon --watch 'src/**/*' -e ts,tsx --exec ts-node -r tsconfig-paths/register ./src/index.ts"
"dev": "nodemon --watch 'src/**/*' -e ts,tsx --exec ts-node -r tsconfig-paths/register ./src/index.ts",
"test": "jest"
},
"dependencies": {
"dataloader": "2.0.0",
Expand All @@ -20,9 +21,15 @@
},
"devDependencies": {
"@types/dotenv": "8.2.0",
"@types/jest": "24.0.25",
"@types/mongoose": "5.5.35",
"@types/ramda": "0.26.39",
"@types/supertest": "2.0.8",
"jest": "24.9.0",
"mongodb-memory-server": "6.2.1",
"nodemon": "2.0.2",
"supertest": "4.0.2",
"ts-jest": "24.3.0",
"ts-node": "8.5.4",
"tsconfig-paths": "3.9.0",
"tslint": "5.20.1",
Expand Down
7 changes: 7 additions & 0 deletions src/controllers/artits.controller.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
describe("Artist controller", () => {
describe("getAllArtists", () => {
test("sort by rating", () => {
expect(true).toBe(true);
});
});
});
Loading

0 comments on commit bc7c629

Please sign in to comment.