docs: add global API types tip when migrating from jest#1020
Conversation
Deploying rstest with
|
| Latest commit: |
4c7e466
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://f2528b83.rstest.pages.dev |
| Branch Preview URL: | https://docs-jest-global-type.rstest.pages.dev |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4c7e4661ac
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ```ts title='tsconfig.json' | ||
| { | ||
| "compilerOptions": { | ||
| "types": ["@rstest/core/globals"] |
There was a problem hiding this comment.
Preserve existing tsconfig types when adding globals
This example replaces compilerOptions.types with only @rstest/core/globals, which causes TypeScript to include just that ambient package list; users who copy it during migration can inadvertently drop existing entries (for example Node or framework-specific globals) and then hit missing-type errors in their tests and config files. Please document this as appending to an existing types array (or explicitly preserving current entries) rather than overwriting it.
Useful? React with 👍 / 👎.
Summary
add global API types tip when migrating from jest.
Related Links
Checklist