Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump up prom-client dependency #52

Merged
merged 4 commits into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 23 additions & 8 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"@types/supertest": "^6.0.2",
"chalk": "^4.1.2",
"chokidar": "^3.6.0",
"prom-client": "^14.2.0",
"prom-client": "^15.1.2",
"response-time": "^2.3.2",
"rollup": "^4.14.3",
"undici": "^5.27.2",
Expand Down
7 changes: 7 additions & 0 deletions run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ runPrismaTests() {
npm run vitest -t ./tests/prisma/*.test.ts
}

# Run MySQL tests
runMysqlTests() {
npm run vitest -t ./tests/mysql2.test.ts
}

# Check if a variable is passed
if [ "$1" = "express" ]; then
npm run vitest -t ./tests/express.test.ts
Expand All @@ -47,6 +52,8 @@ elif [ "$1" = "nestjs" ]; then
runNestJsTests
elif [ "$1" = "prisma" ]; then
runPrismaTests
elif [ "$1" = "mysql2" ]; then
runAllTests
else
runAllTests
fi
8 changes: 4 additions & 4 deletions tests/mysql2.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ describe('mysql2', () => {
expect(
// @ts-ignore
histogram.hashMap[
'database_name:test_db,query:SELECT * FROM users;,status:success'
'database_name:test_db,query:SELECT * FROM users;,status:success,'
]?.count
).toBe(NUMBER_OF_REQUESTS);
});
Expand All @@ -105,7 +105,7 @@ describe('mysql2', () => {
expect(
// @ts-ignore
histogram.hashMap[
'database_name:test_db,query:SELECT * FROM user;,status:failure'
'database_name:test_db,query:SELECT * FROM user;,status:failure,'
]?.count
).toBe(NUMBER_OF_REQUESTS);
});
Expand All @@ -126,7 +126,7 @@ describe('mysql2', () => {
expect(
// @ts-ignore
histogram.hashMap[
'database_name:test_db,query:SELECT * FROM users;,status:success'
'database_name:test_db,query:SELECT * FROM users;,status:success,'
]?.count
).toBe(NUMBER_OF_REQUESTS * 2);
});
Expand All @@ -143,7 +143,7 @@ describe('mysql2', () => {
expect(
// @ts-ignore
histogram.hashMap[
'database_name:test_db,query:SELECT * FROM users;,status:success'
'database_name:test_db,query:SELECT * FROM users;,status:success,'
]?.count
).toBe(NUMBER_OF_REQUESTS * 2);
});
Expand Down
Loading