-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add jest, mock and test example (#58)
* Add jest, mock and test example * Added test automation on the repo * Added first part unit test for stock count * fix: feedback correction and finalise unit test * fix: conflicts and merge master into here * fix:contacts forms are removed * fix: unit test failing
- Loading branch information
1 parent
2e6ced6
commit d956af7
Showing
18 changed files
with
7,215 additions
and
2,833 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,25 @@ | ||
name: CI | ||
|
||
on: [push] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 15 | ||
|
||
defaults: | ||
run: | ||
working-directory: . | ||
|
||
strategy: | ||
matrix: | ||
node-version: [16.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: npm ci | ||
- run: npm test |
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,17 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "Run Jest Tests", | ||
"program": "${workspaceFolder}/node_modules/jest/bin/jest.js", | ||
"args": [ | ||
"${workspaceFolder}/test/stock-count.spec.js", | ||
"--runInBand", | ||
"--verbose" | ||
], | ||
"console": "integratedTerminal" | ||
} | ||
] | ||
} |
Oops, something went wrong.