-
Notifications
You must be signed in to change notification settings - Fork 15
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
feat: add TypeScript type annotation tests with node 22 snapshots #21
Conversation
Maybe we can use node 22 snapshots testing? |
do you think I should integrate it here? |
Id give it a try, and we can use node 22 in the CI |
Hi, I converted it to a snapshot |
missing EOF and some formatting issues |
I updated the test structure, it seemed that there was no need for the main index test anymore, so I updated the test commands in the package.json, but if any tests are added, we can update here |
I think we can add test for this code: type User = {
name: string;
age: number;
};
function isAdult(user: User): boolean {
return user.age >= 18;
}
const justine = {
name: 'Justine',
age: 23,
} satisfies User;
const isJustineAnAdult = isAdult(justine); it will be added to the learn section as an example it would be interesting to test it |
I have added a test on this, thanks for the suggestion |
this should work
|
Ci needs to be run with node 22 and also the engine field with node => 22 in the package.json |
yes it worked as you suggested I tried at 22 🚀 |
please update the ci.yml to use node 22 and add the engines in the package json and squash 🙏🏼 |
c24c021
to
a91c95c
Compare
Greetings, I added a test and tried to get more coverage
Additionally, I have integrated node 22 snapshot testing as suggested. The snapshot tests have been normalized to handle line endings and formatting issues