-
Notifications
You must be signed in to change notification settings - Fork 112
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
feat: public endpoint to verify contracts #69
Conversation
@@ -62,12 +62,12 @@ | |||
"@typescript-eslint/parser": "^5.0.0", | |||
"eslint-config-prettier": "^8.3.0", | |||
"eslint-plugin-prettier": "^4.0.0", | |||
"jest": "28.1.3", | |||
"jest": "29.2.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update jest
to fix an issue with open handlers for supertest request post functions.
@Query(new ParseActionPipe()) action: string, | ||
@Query("module", new ParseModulePipe()) module: ApiModule, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change the order so module pipe works before action pipe. Otherwise even if the module is not found, error about action will be returned.
Visit the preview URL for this PR (updated for commit fe4cedb):
(expires Fri, 03 Nov 2023 11:55:26 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: e508f9012944951194447cb8885950b451a24403 |
@@ -3,7 +3,7 @@ import { INestApplication, ValidationPipe } from "@nestjs/common"; | |||
export const configureApp = (app: INestApplication) => { | |||
app.useGlobalPipes( | |||
new ValidationPipe({ | |||
disableErrorMessages: true, | |||
disableErrorMessages: false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To return the description of 400 Bad Request Errors
@@ -61,13 +61,13 @@ | |||
"@typescript-eslint/parser": "^5.0.0", | |||
"eslint-config-prettier": "^8.3.0", | |||
"eslint-plugin-prettier": "^4.0.0", | |||
"jest": "28.1.3", | |||
"jest": "29.2.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same update as for API, just to use the same lib versions.
expect(blockService.start).toBeCalledTimes(2); | ||
expect(batchService.start).toBeCalledTimes(2); | ||
expect(counterService.start).toBeCalledTimes(2); | ||
expect(balancesCleanerService.start).toBeCalledTimes(2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly, not sure how it worked before but these checks started to fail afterjest
update. 2 - is the correct number of calls here, since 1st call happens on app init, and then the 2nd - while processing the revert event.
🎉 This PR is included in version 2.19.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
# What ❔ Public endpoint to verify contracts ## Checklist <!-- Check your PR fulfills the following items. --> <!-- For draft PRs check the boxes as you complete them. --> - [X] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [X] Tests for the changes have been added / updated. - [X] Documentation comments have been added / updated.
What ❔
Public endpoint to verify contracts
Checklist