Skip to content

Conversation

@wtrocki
Copy link
Member

@wtrocki wtrocki commented Mar 14, 2025

Proposed changes

Use public shortener instead of go links to link to the rule specification (generated Readme).
Created as single PR across all files to avoid confusion in future rule development

@wtrocki wtrocki requested a review from a team as a code owner March 14, 2025 16:42
errors.forEach((error, index) => {
expect(error.code).toEqual(testCase.errors[index].code);
expect(error.message).toEqual(testCase.errors[index].message);
expect(error.message).toMatch(testCase.errors[index].message);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Q: Why change to match?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can use regexp if needed. So basically it is equals when you need equals and regular expression when it is needed. Idea is that we do not need to put lenghtly links in the tests

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

e.g in future if we change url shortener no one will need to spent +1 hour adjusting test covering the error url

@wtrocki wtrocki force-pushed the CLOUDP-305862-url-shortener branch from c35000f to a72f0cc Compare March 14, 2025 17:22
@wtrocki wtrocki force-pushed the CLOUDP-305862-url-shortener branch from e29709c to a8cd82e Compare March 14, 2025 17:27
Copy link
Collaborator

@lovisaberggren lovisaberggren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@wtrocki wtrocki merged commit 25e15ea into main Mar 14, 2025
13 checks passed
@wtrocki wtrocki deleted the CLOUDP-305862-url-shortener branch March 14, 2025 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants