codeflash/.github/workflows/js-tests.yml
Kevin Turcios f4e6df7610 test(js): add JavaScript tracer unit and E2E tests
Add comprehensive test coverage for JavaScript tracing:
- Unit tests for trace parsing (function_calls and legacy schemas)
- Unit tests for replay test generation (Jest and Vitest)
- E2E test for full tracing pipeline with npm dependencies
- Framework detection tests (Jest, Vitest, package.json)
2026-02-05 12:42:57 -05:00

51 lines
1.5 KiB
YAML

name: JavaScript/TypeScript Integration Tests
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true
jobs:
js-integration-tests:
name: JS/TS Integration Tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Install Python dependencies
run: |
uv venv --seed
uv sync
- name: Install npm dependencies for test projects
run: |
npm install --prefix code_to_optimize/js/code_to_optimize_js
npm install --prefix code_to_optimize/js/code_to_optimize_ts
npm install --prefix code_to_optimize/js/code_to_optimize_vitest
- name: Run JavaScript integration tests
run: |
uv run pytest tests/languages/javascript/ -v
uv run pytest tests/test_languages/test_vitest_e2e.py -v
uv run pytest tests/test_languages/test_javascript_e2e.py -v
uv run pytest tests/test_languages/test_javascript_support.py -v
uv run pytest tests/test_languages/test_javascript_tracer.py -v
uv run pytest tests/code_utils/test_config_js.py -v