Skip to content

Commit 1cc8c1b

Browse files
committed
fix: fixes #1 (skos:exactMatch) and add test automation
1 parent a9732f1 commit 1cc8c1b

File tree

6 files changed

+227
-96
lines changed

6 files changed

+227
-96
lines changed

.github/workflows/test.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Test
2+
on:
3+
push:
4+
branches:
5+
- main
6+
tags:
7+
- 'v*'
8+
pull_request:
9+
10+
jobs:
11+
test:
12+
# Run unit tests on windows and linux
13+
runs-on: ${{ matrix.operating-system }}
14+
strategy:
15+
matrix:
16+
operating-system:
17+
- ubuntu-latest
18+
- windows-latest
19+
node-version:
20+
- '18.0'
21+
- 18.x
22+
- '20.0'
23+
- 20.x
24+
- '22.1'
25+
- 22.x
26+
timeout-minutes: 15
27+
steps:
28+
- name: Use Node.js ${{ matrix.node-version }}
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: ${{ matrix.node-version }}
32+
- name: Ensure line endings are consistent
33+
run: git config --global core.autocrlf input
34+
- name: Check out repository
35+
uses: actions/[email protected]
36+
- name: Install dependencies and run build scripts
37+
run: npm ci
38+
- name: Run tests
39+
run: npm run test

jest.config.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
module.exports = {
2+
transform: {
3+
'^.+\\.ts$': [ 'ts-jest', {
4+
tsconfig: 'tsconfig.json',
5+
}],
6+
},
7+
// Only run tests in the unit and integration folders.
8+
// All test files need to have the suffix `.test.ts`.
9+
testRegex: '/test/(unit|integration)/.*\\.test\\.ts$',
10+
moduleFileExtensions: [
11+
'ts',
12+
'js',
13+
],
14+
testEnvironment: 'node',
15+
collectCoverage: true,
16+
coverageReporters: [ 'text', 'lcov' ],
17+
coveragePathIgnorePatterns: [
18+
'/dist/',
19+
'/node_modules/',
20+
'/test/',
21+
],
22+
testTimeout: 90000,
23+
};

0 commit comments

Comments
 (0)