Skip to content

test: add unit tests for cron utils and resend plugin#283

Open
uttam12331 wants to merge 1 commit into
outerbase:mainfrom
uttam12331:test/71-plugin-coverage
Open

test: add unit tests for cron utils and resend plugin#283
uttam12331 wants to merge 1 commit into
outerbase:mainfrom
uttam12331:test/71-plugin-coverage

Conversation

@uttam12331

Copy link
Copy Markdown

Contributes toward #71 (improve test coverage).

Adds Vitest unit tests for two previously-untested plugin modules:

  • plugins/cron/utils.tsparseCronExpression (valid/invalid) and getNextExecutionTime (next-minute boundary, daily cron, advancing across occurrences).
  • plugins/resend/index.ts — the ResendPlugin constructor (with/without api key) and sendEmail (success returns API data and posts the correct payload; failure throws the API message, and a default message when none is provided). fetch is mocked so no network calls are made.

All tests pass via pnpm test (vitest 2.1.8) — 10 tests, 2 files.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant