Skip to content

Commit

Permalink
Add unit tests (#261)
Browse files Browse the repository at this point in the history
* Add unit tests for PCUI

* Add script to run tests

* Fix ArrayInput test

* Update NPM dependencies

* Update NPM dependencies

* Fix all tests

* Check initial CSS classes

* Test some event scenarios

* Unit test for arrow up and down in NumericInput

* Run the unit tests in the GitHub Actions

* Change action name

* Fix case of imports

* node:assert -> assert

* Tweak action names

* Back out package.json changes

* Back out changes to package-lock.json

* Readd jsdom

* Back out package.json changes

* Readd jsdom

* Update jsdom to latest
  • Loading branch information
willeastcott authored Aug 6, 2023
1 parent 84487c9 commit 1b66d6a
Show file tree
Hide file tree
Showing 7 changed files with 951 additions and 321 deletions.
19 changes: 18 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [ main ]

jobs:
build-es5:
build:
name: Build
runs-on: ubuntu-latest
steps:
Expand All @@ -22,6 +22,23 @@ jobs:
- name: Build PCUI
run: npm run build

test:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Node.js 18.x
uses: actions/setup-node@v2.1.4
with:
node-version: 18.x
- name: Install dependencies
run: npm ci
- name: Build PCUI
run: npm run build:es6
- name: Run unit tests
run: npm test

lint:
name: Lint
runs-on: ubuntu-latest
Expand Down
Loading

0 comments on commit 1b66d6a

Please sign in to comment.