Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests: Add tests in Jest to frontend components #7324

Open
wants to merge 15 commits into
base: epic/event-tickets-follow-up-GIVE-371
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .distignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
.editorconfig
.babelrc


/tests
/node_modules
/packages/form-builder/node_modules
/assets/src
Expand Down Expand Up @@ -76,10 +74,11 @@ webpack.mix.js
docker-compose.yml
wp-textdomain.js
.wp-env.json
*.test.js

# GH Action files
DOCKER_ENV
docker_tag
output.log
docker-compose.yml
wp-textdomain.js
wp-textdomain.js
21 changes: 19 additions & 2 deletions .github/workflows/wordpress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ on:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "test"
test:
php_tests:
# The type of runner that the job will run on
runs-on: ubuntu-20.04
strategy:
Expand Down Expand Up @@ -105,3 +104,21 @@ jobs:
run: php -d memory_limit=-1 vendor/bin/phpunit
env:
DB_PORT: ${{ env.mysql_port }}

js_tests:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: 'package-lock.json'

- name: Install npm dependencies
run: |
npm install -g npm@8
npm install

- name: Run Tests
run: npm test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Unit tests
/tmp
/tests/bin/tmp
/tests/resources/coverage

# Bin files
/bin/*
Expand Down
Loading
Loading