Skip to content

Added unit tests for APIs, Secure App and AuthContext hook #5

Added unit tests for APIs, Secure App and AuthContext hook

Added unit tests for APIs, Secure App and AuthContext hook #5

Workflow file for this run

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