Skip to content

Commit

Permalink
fix: fixes #1 (skos:exactMatch) and add test automation
Browse files Browse the repository at this point in the history
  • Loading branch information
woutslabbinck committed Jan 14, 2025
1 parent a9732f1 commit 1cc8c1b
Show file tree
Hide file tree
Showing 6 changed files with 227 additions and 96 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Test
on:
push:
branches:
- main
tags:
- 'v*'
pull_request:

jobs:
test:
# Run unit tests on windows and linux
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system:
- ubuntu-latest
- windows-latest
node-version:
- '18.0'
- 18.x
- '20.0'
- 20.x
- '22.1'
- 22.x
timeout-minutes: 15
steps:
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Ensure line endings are consistent
run: git config --global core.autocrlf input
- name: Check out repository
uses: actions/checkout@v4.1.7
- name: Install dependencies and run build scripts
run: npm ci
- name: Run tests
run: npm run test
23 changes: 23 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module.exports = {
transform: {
'^.+\\.ts$': [ 'ts-jest', {
tsconfig: 'tsconfig.json',
}],
},
// Only run tests in the unit and integration folders.
// All test files need to have the suffix `.test.ts`.
testRegex: '/test/(unit|integration)/.*\\.test\\.ts$',
moduleFileExtensions: [
'ts',
'js',
],
testEnvironment: 'node',
collectCoverage: true,
coverageReporters: [ 'text', 'lcov' ],
coveragePathIgnorePatterns: [
'/dist/',
'/node_modules/',
'/test/',
],
testTimeout: 90000,
};
Loading

0 comments on commit 1cc8c1b

Please sign in to comment.