Skip to content

Conversation

@codevalve
Copy link
Owner

This PR implements a comprehensive test framework for both JavaScript and shell script components.

Changes:

  • Add Jest for JavaScript testing
  • Add BATS for shell script testing
  • Set up test directory structure (unit, integration, shell)
  • Create initial tests for configuration and shell scripts
  • Add GitHub Actions workflow for automated testing
  • Update package.json with various test commands

New Commands:

npm test           # Run all tests
npm run test:unit  # Run Jest tests
npm run test:shell # Run BATS tests
npm run lint:shell # Run shellcheck

GitHub Actions will automatically run tests on:

  • Push to main/develop
  • Pull requests to main/develop

Closes #12

Closes #12

- Add Jest for JavaScript testing
- Add BATS for shell script testing
- Set up test directory structure
- Create initial tests
- Add GitHub Actions workflow
- Update package.json with test scripts
- Add CI status badge
- Add license badge
- Add Node.js version badge
- Add PRs welcome badge
- Specify Node.js version requirement in package.json
- Fix SC2181 warning in common.sh by checking command exit code directly
- Make shellcheck only fail on errors, not style warnings
- Switch to js-yaml for YAML parsing
- Use CommonJS require statements in tests
- Update test assertions to use js-yaml API
- Replace safeLoad with load (removed in js-yaml 4)
- Update test assertions to use new API
- Use BASH_SOURCE for reliable path resolution in session-start.sh
- Update test helper to use absolute paths
- Fix config file path resolution
- Use project root for config file paths
- Fix relative path resolution in session-start.sh
@codevalve codevalve merged commit f652a70 into develop Nov 29, 2024
2 checks passed
@codevalve codevalve deleted the feature/implement-test-framework branch November 29, 2024 03:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants