Skip to content

Commit

Permalink
ci: add tests for parseInputArray.
Browse files Browse the repository at this point in the history
Makes tools into a function to be able to mock it.
It does not need to be exported.
  • Loading branch information
tommie committed Jul 25, 2024
1 parent 716db4a commit 1334612
Show file tree
Hide file tree
Showing 9 changed files with 4,634 additions and 4,825 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,17 @@ jobs:
- run: npm ci
- run: npm run build

test:
name: Test
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: npm
- run: npm ci
- run: npm run test

lint:
name: Lint
runs-on: ubuntu-20.04
Expand Down
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
npm run test
npm run build
git add lib
5 changes: 5 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
};
6 changes: 5 additions & 1 deletion lib/index.js

Large diffs are not rendered by default.

Loading

0 comments on commit 1334612

Please sign in to comment.