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

chore: fix type errors in test files during dev #4458

Merged
merged 1 commit into from
Aug 19, 2024

Conversation

cardoso
Copy link
Contributor

@cardoso cardoso commented Aug 13, 2024

This makes sure vscode picks up vitest/globals.

Details

Does this pull request introduce a breaking change?

  • 😮‍💨 No, it does not introduce a breaking change.

Does this pull request introduce an observable change?

  • 🤞 No, it does not introduce an observable change.

GUS work item

@cardoso cardoso requested a review from a team as a code owner August 13, 2024 23:09
@@ -22,6 +22,8 @@ interface CustomMatchers<R = unknown> {
toBeInRange: (range: { min: number; max: number }, key: string) => R;
}

import 'vitest';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is actually needed for the augmentation to work...

Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's move this up to the top of the file. I'm surprised this doesn't fail the linter.

@@ -60,6 +60,7 @@ function sharedPlugins() {
return [
typescript({
tsconfig: path.join(packageRoot, 'tsconfig.json'),
exclude: ['**/__tests__/**'],
Copy link
Collaborator

Choose a reason for hiding this comment

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

Right, because we still need typechecking in __tests__, we just don't want to do anything with it during the Rollup step.

@nolanlawson
Copy link
Collaborator

/nucleus test

Copy link
Collaborator

@nolanlawson nolanlawson left a comment

Choose a reason for hiding this comment

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

I have a nitpick about the location of the import, but I don't think it's important enough to block this PR. Appreciate the help, thank you!! ❤️

@nolanlawson nolanlawson merged commit a12a3cd into salesforce:master Aug 19, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants