Skip to content

Commit a7ab470

Browse files
Copilotjbampton
andauthored
Add Vitest testing framework with initial test suites
- Install vitest as dev dependency - Add vitest.config.js configuration - Add conditional exports to src/assets/js/games/config.js for testability - Create tests/config.test.mjs with 14 tests for game config module - Create tests/eleventy-config.test.mjs with 13 tests for Eleventy config - Create tests/build-data.test.mjs with 5 tests for build data module - Add test and test:watch scripts to package.json - Add .github/workflows/tests.yml CI workflow Agent-Logs-Url: https://github.com/NextCommunity/NextCommunity.github.io/sessions/58354e39-729b-4d04-8d52-2b31f4f40012 Co-authored-by: jbampton <418747+jbampton@users.noreply.github.com>
1 parent 4ebd467 commit a7ab470

File tree

8 files changed

+1231
-3
lines changed

8 files changed

+1231
-3
lines changed

.github/workflows/tests.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Tests
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
permissions: {}
10+
11+
jobs:
12+
test:
13+
name: Run Tests
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
steps:
18+
- name: Checkout Code
19+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
20+
with:
21+
persist-credentials: false
22+
- name: Setup Node.js
23+
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
24+
with:
25+
node-version: 24
26+
cache: npm
27+
- name: Install dependencies
28+
run: npm ci
29+
- name: Run tests
30+
run: npm test

0 commit comments

Comments
 (0)