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

test: add mocks for packageVersion #811

Merged
merged 3 commits into from
Nov 2, 2023
Merged

test: add mocks for packageVersion #811

merged 3 commits into from
Nov 2, 2023

Conversation

kanadgupta
Copy link
Member

🧰 Changes

Fixes a broken test that was introduced in #799 — added a mock for the PACKAGE_VERSION const in a few places so these tests should be stable for future package bumps.

🧬 QA & Testing

Do tests pass now?

@kanadgupta kanadgupta added refactor Issues about tackling technical debt area:api Issues related to the `api` CLI, which builds the SDKs labels Nov 2, 2023

expect(actual).toBe(expected);
});
return fs.readFile(expectedFilePath, 'utf8').then(async expected => {
Copy link
Member Author

Choose a reason for hiding this comment

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

was able to remove this find + replace logic in favor of a mock 🎊

@kanadgupta kanadgupta marked this pull request as ready for review November 2, 2023 19:24
@kanadgupta kanadgupta merged commit 590f372 into main Nov 2, 2023
5 checks passed
@kanadgupta kanadgupta deleted the mock-package-version branch November 2, 2023 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:api Issues related to the `api` CLI, which builds the SDKs refactor Issues about tackling technical debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants