Skip to content

Commit 2059bea

Browse files
chore(readme): Update node.js.yml to work on all pushed branches
- Changed from "feat-test-CI-implementation-187419042" to "*" for all branches pushed. [Finishes #187419042]
1 parent 6191dc2 commit 2059bea

File tree

7 files changed

+18
-22
lines changed

7 files changed

+18
-22
lines changed

.github/workflows/node.js.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ on:
77
push:
88
branches:
99
- feat-test-CI-implementation-187419042
10+
- "*"
1011
- develop
12+
1113
pull_request:
1214
branches:
1315
- develop
@@ -38,7 +40,7 @@ jobs:
3840
- name: Run tests and build test coverage
3941
run: npm run test:ci
4042

41-
- name: Test & publish code coverage
43+
- name: Test & publish code climate coverage
4244
uses: paambaati/[email protected]
4345
env:
4446
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}

README.md

-9
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,14 @@
11
[![Coverage Status](https://coveralls.io/repos/github/atlp-rwanda/hackers-ec-be/badge.svg?branch=feat-test-CI-implementation-187419042)](https://coveralls.io/github/atlp-rwanda/hackers-ec-be?branch=feat-test-CI-implementation-187419042)
2-
32
[![Maintainability](https://api.codeclimate.com/v1/badges/0f9cac26fd6bc0a2f7a9/maintainability)](https://codeclimate.com/github/atlp-rwanda/hackers-ec-be/maintainability)
4-
53
[![Test Coverage](https://api.codeclimate.com/v1/badges/0f9cac26fd6bc0a2f7a9/test_coverage)](https://codeclimate.com/github/atlp-rwanda/hackers-ec-be/test_coverage)
6-
74
![](https://img.shields.io/badge/Express.js-404D59?style=for-the-badge)
8-
95
![](https://img.shields.io/badge/Node.js-43853D?style=for-the-badge&logo=node.js&logoColor=white)
10-
116
![](https://img.shields.io/badge/PostgreSQL-316192?style=for-the-badge&logo=postgresql&logoColor=white)
12-
137
![](https://img.shields.io/badge/sequelize-323330?style=for-the-badge&logo=sequelize&logoColor=blue)
148

159
![](https://img.shields.io/badge/TypeScript-007ACC?style=for-the-badge&logo=typescript&logoColor=white)
16-
1710
![](https://img.shields.io/badge/GitHub_Actions-2088FF?style=for-the-badge&logo=github-actions&logoColor=white)
18-
1911
![](https://img.shields.io/badge/Jest-323330?style=for-the-badge&logo=Jest&logoColor=white)
20-
2112
![](https://img.shields.io/badge/GitHub-100000?style=for-the-badge&logo=github&logoColor=white)
2213

2314
# hackers-ec-be

package.json

+5-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"seed:undo": "npx sequelize-cli db:seed:undo:all",
1414
"test": "jest --no-cache --detectOpenHandles",
1515
"test-test": "jest --watchAll --no-cache --detectOpenHandles",
16-
"test:ci": "jest --detectOpenHandles --coverage"
16+
"test:ci": "jest --detectOpenHandles --coverage --verbose"
1717
},
1818
"keywords": [],
1919
"author": "",
@@ -35,7 +35,6 @@
3535
"sequelize": "^6.37.3",
3636
"uuid": "^9.0.0"
3737
},
38-
3938
"transform": {
4039
"^.+\\.(ts|tsx)?$": "ts-jest",
4140
"^.+\\.(js|jsx)$": "babel-jest",
@@ -60,6 +59,9 @@
6059
"json-summary",
6160
"text",
6261
"lcov"
62+
],
63+
"coveragePathIgnorePatterns": [
64+
"/src/database/config/db.config.ts"
6365
]
6466
},
6567
"devDependencies": {
@@ -87,4 +89,4 @@
8789
"ts-node-dev": "^2.0.0",
8890
"typescript": "^5.4.5"
8991
}
90-
}
92+
}

src/__test__/login.test.ts

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ describe("LOGIN API TEST", () => {
1111

1212
it("should login successfully with correct credentials", async () => {
1313
// Your test implementation goes here
14+
const { body } = await request(app).get("")
15+
console.log(body);
1416
});
1517
it("should return 401 for login with incorrect credentials", async () => {
1618
// Your test implementation goes here

src/__test__/product.test.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import app from "../app";
22
import request from "supertest";
3-
import { connectionToDatabase } from "../database/config/db.config";
3+
// import { connectionToDatabase } from "../database/config/db.config";
44

55
jest.setTimeout(30000);
66

77
describe("PRODUCT API TEST", () => {
8-
beforeAll(async () => {
9-
await connectionToDatabase();
10-
});
8+
// beforeAll(async () => {
9+
// await connectionToDatabase();
10+
// });
1111

1212
it("Seller should create a product", async () => {
1313
// Your test implementation goes here

src/__test__/users.test.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import app from "../app";
22
import request from "supertest";
3-
import { connectionToDatabase } from "../database/config/db.config";
3+
// import { connectionToDatabase } from "../database/config/db.config";
44

55
jest.setTimeout(30000);
66

77
describe("USER API TEST", () => {
8-
beforeAll(async () => {
9-
await connectionToDatabase();
10-
});
8+
// beforeAll(async () => {
9+
// await connectionToDatabase();
10+
// });
1111

1212
it("Should return 200 and list of all users", async () => {
1313
// Your test implementation goes here

src/index.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import "reflect-metadata";
21
import app from "./app";
32
import { PORT } from "./utils/keys";
43
import { connectionToDatabase } from "./database/config/db.config";

0 commit comments

Comments
 (0)