Skip to content

Commit d592eb8

Browse files
authored
added exhaustive unit tests which closes #5 (#7)
1 parent f115eda commit d592eb8

File tree

6 files changed

+6334
-696
lines changed

6 files changed

+6334
-696
lines changed

.github/workflows/npm-publish.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,15 @@ jobs:
2929
# set up git since we will later push to the repo
3030
- run: git config --global user.name "GitHub CD bot"
3131
- run: git config --global user.email "github-cd-bot@example.com"
32-
# upgrade npm version in package.json to the tag used in the release.
33-
- run: npm version ${{ github.event.release.tag_name }}
3432
# build the project
3533
- run: npm run build
34+
# run linter
35+
- run: npm run lint
3636
# run tests just in case
37-
# - run: npm test
37+
- run: npm test
38+
# upgrade npm version in package.json to the tag used in the release.
39+
- run: npm version ${{ github.event.release.tag_name }}
40+
# publish the package
3841
- run: npm publish
3942
env:
4043
# Use a token to publish to NPM. See below for how to set it up

jest.config.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module.exports = {
2+
"roots": [
3+
"<rootDir>/src"
4+
],
5+
"testMatch": [
6+
"**/__tests__/**/*.+(ts|tsx|js)",
7+
"**/?(*.)+(spec|test).+(ts|tsx|js)"
8+
],
9+
"transform": {
10+
"^.+\\.(ts|tsx)$": "ts-jest"
11+
},
12+
}

0 commit comments

Comments
 (0)