feat: Add vitest test setup and CI workflow to all JS/TS templates#719
Open
feat: Add vitest test setup and CI workflow to all JS/TS templates#719
Conversation
- Add vitest as devDependency and update test script in all 25 JS/TS templates - Add example test file (test/main.test.js or test/main.test.ts) - Add GitHub Actions CI workflow: JS templates run tests, TS templates build + test - ts-start-bun uses Bun-specific workflow with oven-sh/setup-bun - ts-playwright-test-runner gets vitest.config.ts to avoid conflicting with Playwright specs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… templates - Replace placeholder `expect(1+1).toBe(2)` tests with real crawler tests in all 10 crawlee templates (cheerio, playwright, puppeteer) - Tests actually run the crawler against https://www.example.com and verify title extraction - Add `npx playwright install --with-deps chromium` CI step for playwright-based templates - Remove vitest setup from js-cypress and ts-playwright-test-runner since they already have their own test frameworks (Cypress, Playwright Test) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Sort named imports alphabetically to satisfy simple-import-sort/imports - Reorder module imports so @crawlee/* comes before vitest - Add ./test/**/* to tsconfig.json include in all TS templates so typescript-eslint parser can resolve test files Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adding test files to tsconfig.json broke Docker builds because tsc compiled them and hit type errors. Instead, exclude **/test from eslint in TS templates and revert tsconfig.json to only include src. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
vitestas devDependency to all 25 JS/TS templatesvitest runtest/main.test.js/test/main.test.ts) to each template.github/workflows/test.yamlCI workflow to each template:tsc) + testoven-sh/setup-buninstead of Node🤖 Generated with Claude Code