Skip to content

chore: use test() helper in type tests#1472

Merged
willfarrell merged 1 commit intomiddyjs:mainfrom
mrazauskas:use-type-test-helpers
Sep 10, 2025
Merged

chore: use test() helper in type tests#1472
willfarrell merged 1 commit intomiddyjs:mainfrom
mrazauskas:use-type-test-helpers

Conversation

@mrazauskas
Copy link
Copy Markdown
Contributor

What does this implement/fix? Explain your changes.

This PR replaces comments with the test() helper in type tests. The helpers improve structure of the test files. .only and .skip can be used while debugging.

The diff is mostly white space change.

Tips. When running a single file, TSTyche will print out the structure with passing / failing test cases: npx tstyche utils. You can use --only and --skip directly from CLI: npx tstyche utils --only choose.

Note. packages/core/index.test-d.ts was too complex for me. I left it for follow up PR.

Todo List:

  • All commits are cryptographically signed
  • Feature/Fix fully implemented
  • Updated relevant types
  • Added tests (if applicable)
    • Unit tests
    • Fuzz tests
    • Type tests
    • Benchmark tests
  • Updated relevant documentation
  • Updated relevant examples

@mrazauskas mrazauskas requested a review from a team as a code owner September 10, 2025 05:08
Signed-off-by: mrazauskas <tom@mrazauskas.de>
Comment on lines +10 to +13
test("use with all options", () => {
const middleware = httpEventNormalizer();
expect(middleware).type.toBe<middy.MiddlewareObj<Event>>();
});
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This one looks like a duplicate of the above test. Or I missed something?

@willfarrell willfarrell merged commit 4ebea1b into middyjs:main Sep 10, 2025
13 checks passed
@mrazauskas mrazauskas deleted the use-type-test-helpers branch September 10, 2025 12:17
@willfarrell
Copy link
Copy Markdown
Member

Awesome! Thanks for the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants