Skip to content

Commit 8b32bcd

Browse files
author
fo057145
committed
Ajustando relatorio de testes
1 parent 6c33afc commit 8b32bcd

File tree

5 files changed

+120
-39
lines changed

5 files changed

+120
-39
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
node_modules
2-
test-report.html
2+
html-report
3+
junit.xml

.gitlab-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ before_script:
1515
unit_test:
1616
stage: test
1717
script:
18-
- npm run test -- --ci --reporters=default --reporters=jest-junit
18+
- npm test -- --ci
1919
artifacts:
2020
when: always
2121
reports:
2222
junit: junit.xml
2323
paths:
24-
- test-report.html
24+
- html-report
2525
- junit.xml
2626
only:
2727
- merge_requests

jest.config.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,15 @@ const config: Config = {
1717
},
1818
reporters: [
1919
"default",
20-
["./node_modules/jest-html-reporter", {
21-
"pageTitle": "Relatório da Suíte de Testes"
20+
["jest-html-reporters", {
21+
"publicPath": "./html-report",
22+
"filename": "report.html",
23+
"expand": true,
24+
"pageTitle": "Relatório Detalhado dos Testes"
25+
}],
26+
["jest-junit", {
27+
"outputDirectory": ".",
28+
"outputName": "junit.xml"
2229
}]
2330
],
2431
testLocationInResults: true

package-lock.json

Lines changed: 105 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
"csvtojson": "^2.0.10",
55
"dotenv": "^16.5.0",
66
"jest": "^29.7.0",
7-
"jest-html-reporter": "^3.10.2",
8-
"jest-junit": "^16.0.0",
97
"mssql": "^11.0.1",
108
"mysql2": "^3.14.1",
119
"pg": "^8.16.0",
@@ -18,6 +16,8 @@
1816
"@types/mssql": "^9.1.7",
1917
"@types/node": "^22.10.6",
2018
"@types/pg": "^8.15.2",
19+
"jest-html-reporters": "^3.1.7",
20+
"jest-junit": "^16.0.0",
2121
"supertest": "^6.3.4",
2222
"ts-jest": "^29.1.2",
2323
"typescript": "^5.3.3"

0 commit comments

Comments
 (0)