-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New tests for multiple test attributes; formatting; fix Dependabot 4;…
… Github Actions for unit testing (#21) * new tests for multiple testAttributes * add Prettier config; formatting (trivial change) * regenerate package-lock (fixes Dependabot 4) * Github Actions for unit testing
- Loading branch information
1 parent
026f1c5
commit 662e773
Showing
23 changed files
with
260 additions
and
221 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: unit testing | ||
on: | ||
push: | ||
pull_request: | ||
jobs: | ||
build-and-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Checks out code from Github. | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
# Restore cache if available. | ||
- name: Restore cached dependencies | ||
id: dep-cache | ||
uses: actions/cache@v3 | ||
env: | ||
cache-name: jstoxml-cache | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-build-${{ env.cache-name }}- | ||
${{ runner.os }}-build- | ||
${{ runner.os }}- | ||
# Fully install from scratch when no cache is available. | ||
- name: Install dependencies from scratch (cache miss only) | ||
if: steps.dep-cache.outputs.cache-hit != 'true' | ||
run: npm i | ||
- name: Unit tests | ||
run: npm test | ||
shell: bash |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/** | ||
* Config for Prettier, to automatically format code. See https://prettier.io/ | ||
*/ | ||
|
||
module.exports = { | ||
semi: true, | ||
trailingComma: 'none', | ||
singleQuote: true, | ||
printWidth: 120, | ||
tabWidth: 4 | ||
}; |
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.