refactor(types): migrate from tsd to tstyche#294
Merged
Conversation
- Replace tsd dependency with tstyche - Create tsconfig.json with node16 module resolution - Rename type test file from .test-d.ts to .tst.ts - Add explicit tstyche type assertions
- Add 82 type assertions covering all schema types - Test BaseSchema properties: id, title, description, required, isFluentSchema, etc. - Test StringSchema methods: minLength, maxLength, format, pattern, etc. - Test NumberSchema/IntegerSchema methods: minimum, maximum, multipleOf, etc. - Test ArraySchema methods: items, contains, uniqueItems, minItems, etc. - Test ObjectSchema methods: prop, definition, extend, only, without, etc. - Test FORMATS enum values - Test FluentSchemaError type - Test MixedSchema combined types
This reverts commit 612ea07.
- Migrate from tsd to tstyche - Add 42 type assertions to existing code examples - Verify methods exist on schema objects using toHaveProperty - Test FluentSchemaError instanceof type
mrazauskas
reviewed
May 6, 2026
- Update tstyche from 1.0.0 to 7.1.0 - Update assertions to use toBe instead of toEqual
Tony133
reviewed
May 6, 2026
Member
Tony133
left a comment
There was a problem hiding this comment.
My only doubt is the console.log() statements in the FluentJSONSchema.tst.ts file: maybe we could remove them. I'm waiting for the final review from @mrazauskas. Otherwise, LGTM! 🔥 🚀
Contributor
Author
I had the same doubt! But I preferred to take them just so as not to change the file too much. |
mrazauskas
reviewed
May 7, 2026
mrazauskas
reviewed
May 7, 2026
|
lgtm |
Tony133
approved these changes
May 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR of Reference:
Checklist
npm run test && npm run benchmark --if-presentand the Code of conduct