Skip to content

Commit 1b2463e

Browse files
authored
Merge pull request #1204 from codeflash-ai/add_vitest_support_to_js
vitest support add to js/ts project
2 parents dbe4221 + 82d9e43 commit 1b2463e

File tree

28 files changed

+11360
-59
lines changed

28 files changed

+11360
-59
lines changed

.github/workflows/js-tests.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: JavaScript/TypeScript Integration Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
workflow_dispatch:
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref_name }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
js-integration-tests:
16+
name: JS/TS Integration Tests
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
token: ${{ secrets.GITHUB_TOKEN }}
24+
25+
- name: Setup Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: '20'
29+
30+
- name: Install uv
31+
uses: astral-sh/setup-uv@v6
32+
33+
- name: Install Python dependencies
34+
run: |
35+
uv venv --seed
36+
uv sync
37+
38+
- name: Install npm dependencies for test projects
39+
run: |
40+
npm install --prefix code_to_optimize/js/code_to_optimize_js
41+
npm install --prefix code_to_optimize/js/code_to_optimize_ts
42+
npm install --prefix code_to_optimize/js/code_to_optimize_vitest
43+
44+
- name: Run JavaScript integration tests
45+
run: |
46+
uv run pytest tests/languages/javascript/ -v
47+
uv run pytest tests/test_languages/test_vitest_e2e.py -v
48+
uv run pytest tests/test_languages/test_javascript_e2e.py -v
49+
uv run pytest tests/test_languages/test_javascript_support.py -v
50+
uv run pytest tests/code_utils/test_config_js.py -v

code_to_optimize/js/code_to_optimize_js/package-lock.json

Lines changed: 7 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

code_to_optimize/js/code_to_optimize_js_cjs/package-lock.json

Lines changed: 7 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)