-
Notifications
You must be signed in to change notification settings - Fork 134
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(test-d): add test-d files for vitest typechecking: #1248
test(test-d): add test-d files for vitest typechecking: #1248
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
How to use the Graphite Merge QueueAdd the label graphite-merge-queue to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
@@ -102,3 +102,6 @@ jobs: | |||
- name: Unit Test | |||
run: yarn test:ci | |||
|
|||
- name: Typecheck Test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.vitest/vitest.shared.ts
Outdated
@@ -3,6 +3,11 @@ import { configDefaults, defineConfig } from "vitest/config"; | |||
|
|||
export const sharedConfig = defineConfig({ | |||
test: { | |||
typecheck: { | |||
enabled: process.env.TYPECHECK === "true", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So using a ENV because I should have been able to pass this as an argument to the vitest.
After hours of it not working, I did this env and it just works. So 🤷♀️
typecheck: { | ||
enabled: process.env.TYPECHECK === "true", | ||
only: process.env.TYPECHECK === "true", | ||
ignoreSourceErrors: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah we should just exclude this file from the test sets since later we'll delete this file. That way the other tests can at least get caught as well. We've had cases where code built no prob but it ruined some branch of the types and we didn't notice cuz the tests don't get type checked
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They already are excluded in the tests btw, just the typecheck will check non test files that are excluded.
@@ -17,6 +17,7 @@ | |||
"!vitest.config.ts", | |||
"!.env", | |||
"!src/**/*.test.ts", | |||
"!src/**/*.test-d.ts", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anyplace that I found .test.ts
I add the test-d
variant
d97b716
to
6269d09
Compare
You must have Developer access to commit code to Alchemy on Vercel. If you contact an administrator and receive Developer access, commit again to see your changes. Learn more: https://vercel.com/docs/accounts/team-members-and-roles/access-roles#team-level-roles |
6269d09
to
5374388
Compare
Merge activity
|
cca9ba3
to
e7bcc56
Compare
5374388
to
80c1c59
Compare
e7bcc56
to
939f24e
Compare
80c1c59
to
50c2618
Compare
939f24e
to
a0fdd71
Compare
50c2618
to
d973a94
Compare
a0fdd71
to
22a2e20
Compare
d973a94
to
e0db87d
Compare
# Pull Request Checklist - [x] Did you add new tests and confirm existing tests pass? (`yarn test`) - [x] Did you update relevant docs? (docs are found in the `site` folder, and guidelines for updating/adding docs can be found in the [contribution guide](https://github.com/alchemyplatform/aa-sdk/blob/main/CONTRIBUTING.md)) - [x] Do your commits follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) standard? - [x] Does your PR title also follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) standard? - [x] If you have a breaking change, is it [correctly reflected in your commit message](https://www.conventionalcommits.org/en/v1.0.0/#examples)? (e.g. `feat!: breaking change`) - [x] Did you run lint (`yarn lint:check`) and fix any issues? (`yarn lint:write`) - [x] Did you follow the [contribution guidelines](https://github.com/alchemyplatform/aa-sdk/blob/main/CONTRIBUTING.md)? <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on enhancing type checking and testing for the `account-kit` packages, particularly by adding `test-d.ts` files and updating test commands. It also removes unused code related to Alchemy transport. ### Detailed summary - Added `test-d.ts` files for type definitions in multiple packages. - Updated `.github/workflows/on-pull-request.yml` to include type checking in tests. - Modified `package.json` to add a new `test:typecheck` script. - Updated `CONTRIBUTING.md` to reflect changes in testing commands. - Removed Alchemy-related code from `client.test.ts`. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
22a2e20
to
cd9053b
Compare
e0db87d
to
21acc9f
Compare
The base branch was changed.
Pull Request Checklist
yarn test
)site
folder, and guidelines for updating/adding docs can be found in the contribution guide)feat!: breaking change
)yarn lint:check
) and fix any issues? (yarn lint:write
)PR-Codex overview
This PR primarily focuses on enhancing type-checking and testing configurations across various packages, while also removing unnecessary code related to
AlchemyTransport
. It introduces new test files and updates existing tests to ensure better type safety and code quality.Detailed summary
test-d.ts
files for improved type-checking.package.json
files to exclude.test.ts
and include.test-d.ts
.CONTRIBUTING.md
to reflect new testing practices.AlchemyTransport
related code fromclient.test.ts
.client.test-d.ts
for type assertions.