From 7a4996c40a07791c855f8a074ddf3b3249b82e13 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 9 Nov 2025 00:14:31 +0000 Subject: [PATCH] feat: Add testing infrastructure and documentation - Set up Vitest for unit testing with jsdom - Add test setup with Web Audio API and requestAnimationFrame mocks - Create initial test suites for DOM and animations modules - Add test scripts to package.json (test, test:ui, test:run, coverage) - Update CI workflow to include test execution - Create CONTRIBUTING.md with conventional commits guidelines - Create SECURITY.md with security policy - Update ESLint config to support test files - All tests passing (8/8) Co-authored-by: ZaneThePython <102631678+ZaneThePython@users.noreply.github.com> --- .github/workflows/ci.yml | 5 +- CONTRIBUTING.md | 179 +++++++ SECURITY.md | 71 +++ eslint.config.js | 14 + package-lock.json | 999 ++++++++++++++++++++++++++++++++++++++- package.json | 9 +- tests/animations.test.js | 40 ++ tests/dom.test.js | 69 +++ tests/setup.js | 34 ++ vite.config.js | 9 + 10 files changed, 1426 insertions(+), 3 deletions(-) create mode 100644 CONTRIBUTING.md create mode 100644 SECURITY.md create mode 100644 tests/animations.test.js create mode 100644 tests/dom.test.js create mode 100644 tests/setup.js diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fa8c92a..7506be9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ on: branches: [ main ] jobs: - lint-and-build: + lint-test-build: runs-on: ubuntu-latest strategy: @@ -33,6 +33,9 @@ jobs: - name: Check formatting run: npm run format:check + - name: Run tests + run: npm run test:run + - name: Build project run: npm run build diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..cc75394 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,179 @@ +# Contributing to ZanePersonal + +Thank you for your interest in contributing to this project! While this is primarily a personal website, contributions are welcome. + +## Commit Message Format + +This project follows the [Conventional Commits](https://www.conventionalcommits.org/) specification for commit messages. + +### Format + +``` +(): + + + +