Added unit tests for APIs, Secure App and AuthContext hook #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run Tests | |
on: | |
pull_request: | |
push: | |
branches: [main] | |
jobs: | |
run-tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
- name: Install dependencies | |
run: | | |
npm install | |
npm install --save-dev jest babel-jest @babel/preset-env @babel/preset-react | |
npm install --save-dev @testing-library/react @testing-library/jest-dom | |
npm install --save-dev @babel/preset-typescript | |
- name: Configure Jest with Babel | |
run: | | |
echo '{"presets": ["@babel/preset-env", "@babel/preset-react", "@babel/preset-typescript"]}' > babel.config.json | |
- name: Run tests | |
run: npm test |