Skip to content

test: cover cron plugin behavior#183

Open
Treasure520520 wants to merge 1 commit into
outerbase:mainfrom
Treasure520520:bounty/71-cron-plugin-coverage
Open

test: cover cron plugin behavior#183
Treasure520520 wants to merge 1 commit into
outerbase:mainfrom
Treasure520520:bounty/71-cron-plugin-coverage

Conversation

@Treasure520520
Copy link
Copy Markdown

Summary

Adds focused Vitest coverage for the cron plugin slice of #71.

This covers:

  • plugin metadata and auth requirement
  • next execution time calculation
  • addEvent rejection before initialization
  • middleware table initialization with no empty-task alarm scheduling
  • nearest-task activation and setAlarm scheduling
  • event insertion and alarm rescheduling
  • /cron/callback payload dispatch
  • async onEvent handlers being passed into ctx.waitUntil

Bounty

Contributes to Algora bounty issue #71.

Verification

  • COREPACK_ENABLE_PROJECT_SPEC=0 corepack pnpm vitest plugins/cron/index.test.ts --run
  • COREPACK_ENABLE_PROJECT_SPEC=0 corepack pnpm exec prettier --check plugins/cron/index.test.ts
  • git diff --check
  • COREPACK_ENABLE_PROJECT_SPEC=0 corepack pnpm exec tsc --noEmit --pretty false 2>&1 | tee /tmp/starbasedb-cron-tsc.log; ! rg -n "plugins/cron" /tmp/starbasedb-cron-tsc.log

Full-suite note:

  • COREPACK_ENABLE_PROJECT_SPEC=0 corepack pnpm vitest --run still reports the existing 4 RLS failures in src/rls/index.test.ts; the new cron test file passes in that run.

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