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

Use jest to mask account number in snapshot #21

Merged
merged 2 commits into from
Nov 29, 2023
Merged

Conversation

silvacb
Copy link
Contributor

@silvacb silvacb commented Nov 29, 2023

What does this change?

The DevEx team have recommended using jest to mask the account number in the snapshot.
Following the steps outlined here https://github.com/guardian/private-infrastructure-config?tab=readme-ov-file#using-with-jest seems to have done the trick.

Comment on lines +2 to +3
setupFilesAfterEnv: ["./jest.setup.js"],
transformIgnorePatterns: ["node_modules/(?!@guardian/private-infrastructure-config)"],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Comment on lines +4 to +5
testMatch: ["<rootDir>/lib/**/*.test.ts"],
transform: {"^.+\\.tsx?$": "ts-jest"},
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Lines 4 and 5 were taken from the package.json and moved here.

@silvacb silvacb marked this pull request as ready for review November 29, 2023 10:05
Copy link
Contributor

@DavidLawes DavidLawes left a comment

Choose a reason for hiding this comment

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

Nice - looks like it does exactly what we wanted :)

Copy link
Contributor

@waisingyiu waisingyiu left a comment

Choose a reason for hiding this comment

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

LGTM

@silvacb silvacb merged commit 647a9a3 into main Nov 29, 2023
1 check passed
@silvacb silvacb mentioned this pull request Nov 29, 2023
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.

3 participants