Skip to content

Commit 5382bd4

Browse files
authored
Issue 620 add stryker (#75)
* feature: introduce mutation testing fixes idrinth-api-bench/issues#620 * feature: introduce mutation testing fixes idrinth-api-bench/issues#620 * feature: introduce mutation testing fixes idrinth-api-bench/issues#620 * feature: introduce mutation testing fixes idrinth-api-bench/issues#620 * feature: introduce mutation testing fixes idrinth-api-bench/issues#620 * feature: introduce mutation testing fixes idrinth-api-bench/issues#620 * Update package and -lock
1 parent 2f8563d commit 5382bd4

12 files changed

Lines changed: 7458 additions & 3443 deletions

File tree

.github/workflows/test.yml

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ jobs:
7474
strategy:
7575
matrix:
7676
version:
77-
- 20
78-
- 21
79-
- 22
77+
- 20
78+
- 21
79+
- 22
8080
steps:
8181
- uses: actions/checkout@v4
8282
- name: Use Node.js ${{ matrix.version }}
@@ -95,6 +95,31 @@ jobs:
9595
github-token: ${{ secrets.GITHUB_TOKEN }}
9696
parallel: true
9797
flag-name: property-test-${{ matrix.version }}
98+
mutation:
99+
runs-on: ubuntu-latest
100+
needs:
101+
- unit-test
102+
- integration
103+
- property
104+
strategy:
105+
matrix:
106+
version:
107+
- 20
108+
- 21
109+
- 22
110+
steps:
111+
- uses: actions/checkout@v4
112+
- name: Use Node.js ${{ matrix.version }}
113+
uses: actions/setup-node@v4.0.3
114+
with:
115+
node-version: ${{ matrix.version }}
116+
cache: 'npm'
117+
cache-dependency-path: |
118+
package-lock.json
119+
- run: npm ci
120+
- run: npm run language
121+
- run: sed -i 's/testFileNames\.forEach/testFileNames\.files\.forEach/' node_modules/@stryker-mutator/mocha-runner/dist/src/mocha-test-runner.js
122+
- run: npm run mutation
98123
end:
99124
runs-on: ubuntu-latest
100125
needs:

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,7 @@
55
/result.*
66
/src/**/*.js
77
/index.js
8+
9+
# stryker temp files
10+
.stryker-tmp
11+
/reports/

.nycrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
"src/logger/logger.ts",
2424
"src/helper/static-implements.ts",
2525
"src/open-api/open-api.ts",
26-
"src/result-map.ts"
26+
"src/result-map.ts",
27+
"src/locales/*.ts"
2728
],
2829
"include": ["src/**/*.ts"]
2930
}

integration/iab.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
import 'mocha';
66
import {
77
spawn,
8+
ChildProcess,
89
} from 'child_process';
910
import url from 'url';
1011
import Counter from '../src/helper/counter';
@@ -22,15 +23,17 @@ const WAIT_DELAY = 2500;
2223
const SETUP_TIMEOUT = 10000;
2324

2425
describe('iab-cli', function() {
26+
let server: ChildProcess;
2527
before(() => {
26-
spawn('node', [
28+
server = spawn('node', [
2729
__dirname + '../fixtures/server.cjs',
2830
'48912',
2931
],);
3032
Counter.clear();
3133
},);
3234
after(() => {
3335
Counter.clear();
36+
server.kill();
3437
},);
3538
beforeEach(() => {
3639
prepareTempDir();

0 commit comments

Comments
 (0)