Skip to content

Commit 1334612

Browse files
committed
ci: add tests for parseInputArray.
Makes tools into a function to be able to mock it. It does not need to be exported.
1 parent 716db4a commit 1334612

File tree

9 files changed

+4634
-4825
lines changed

9 files changed

+4634
-4825
lines changed

.github/workflows/test.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,17 @@ jobs:
1616
- run: npm ci
1717
- run: npm run build
1818

19+
test:
20+
name: Test
21+
runs-on: ubuntu-20.04
22+
steps:
23+
- uses: actions/checkout@v4
24+
- uses: actions/setup-node@v4
25+
with:
26+
cache: npm
27+
- run: npm ci
28+
- run: npm run test
29+
1930
lint:
2031
name: Lint
2132
runs-on: ubuntu-20.04

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
npm run test
12
npm run build
23
git add lib

jest.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/** @type {import('ts-jest').JestConfigWithTsJest} */
2+
module.exports = {
3+
preset: 'ts-jest',
4+
testEnvironment: 'node',
5+
};

lib/index.js

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)