Skip to content

Commit

Permalink
Added a test function for sign up js and set up a git action workflow…
Browse files Browse the repository at this point in the history
… for automated testing
  • Loading branch information
gbengaoluwadahunsi committed Mar 30, 2024
1 parent 276b902 commit 87b738e
Show file tree
Hide file tree
Showing 5 changed files with 6,042 additions and 1,107 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Run Tests

on:
pull_request:
branches:
- master
- develop

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16.x'

- name: Install dependencies and ESLint
run: |
npm install
npm install eslint eslint-config-google
- name: Run Jest tests and linting
run: |
npm run lint && npm test
3 changes: 3 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
testEnvironment: 'jsdom',
};
Loading

0 comments on commit 87b738e

Please sign in to comment.