Skip to content

Commit 760df6a

Browse files
Merge pull request #3 from runtimeverification/improve-test-suite
Strengthen test suite: coverage, property tests, mutation testing
2 parents c758afe + 82a73f6 commit 760df6a

23 files changed

Lines changed: 3844 additions & 45 deletions

.c8rc.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"all": true,
3+
"src": ["src"],
4+
"exclude-after-remap": true,
5+
"include": ["src/**/*.ts"],
6+
"exclude": [
7+
"src/**/*.d.ts",
8+
"src/debugAdapter/types.ts",
9+
"src/sourcemap/SourceMapper.ts"
10+
],
11+
"extension": [".ts"],
12+
"reporter": ["text", "html", "lcov"],
13+
"report-dir": "coverage",
14+
"clean": true
15+
}

.github/workflows/ci.yml

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,19 @@ on:
44
push:
55
branches: [main]
66
pull_request:
7+
# Allow running the (slow) mutation-testing job on demand and nightly.
8+
workflow_dispatch:
9+
schedule:
10+
- cron: '0 3 * * *'
711

812
concurrency:
913
group: ${{ github.workflow }}-${{ github.ref }}
1014
cancel-in-progress: true
1115

1216
jobs:
1317
build-and-test:
18+
# Skip the fast PR pipeline on the nightly schedule (mutation job runs then).
19+
if: github.event_name != 'schedule'
1420
runs-on: ubuntu-latest
1521
steps:
1622
- uses: actions/checkout@v4
@@ -33,5 +39,33 @@ jobs:
3339
- name: Build
3440
run: npm run build
3541

36-
- name: Test
37-
run: npm test
42+
- name: Test with coverage gate
43+
run: npm run coverage:ci
44+
45+
mutation:
46+
# Mutation testing multiplies the suite runtime, so it is NOT on the PR
47+
# critical path — run it manually (workflow_dispatch) or nightly (schedule).
48+
if: github.event_name == 'workflow_dispatch' || github.event_name == 'schedule'
49+
runs-on: ubuntu-latest
50+
steps:
51+
- uses: actions/checkout@v4
52+
53+
- name: Set up Node.js
54+
uses: actions/setup-node@v4
55+
with:
56+
node-version: 22
57+
cache: npm
58+
59+
- name: Install dependencies
60+
run: npm ci
61+
62+
- name: Mutation testing (pure core)
63+
run: npm run mutation
64+
65+
- name: Upload mutation report
66+
if: always()
67+
uses: actions/upload-artifact@v4
68+
with:
69+
name: mutation-report
70+
path: reports/mutation
71+
if-no-files-found: ignore

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
node_modules/
22
dist/
33
out/
4+
coverage/
5+
reports/
6+
.stryker-tmp/
47
*.vsix
58
.DS_Store
69
*.log

.mocharc.stryker.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"spec": [
3+
"out/test/**/*.test.js"
4+
],
5+
"ignore": [
6+
"out/test/dap.test.js",
7+
"out/test/dapStepping.test.js",
8+
"out/test/dapControlStepping.test.js",
9+
"out/test/dapVariables.test.js",
10+
"out/test/dapMemoryVariables.test.js",
11+
"out/test/integration.node.test.js",
12+
"out/test/integration.build.test.js",
13+
"out/test/contractBuilder.test.js"
14+
],
15+
"timeout": 30000
16+
}

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,20 @@ All notable changes to this extension are documented in this file. The format is
44
based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this
55
project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [Unreleased]
8+
9+
### Fixed
10+
11+
- Launch argument encoding now rejects invalid integer values instead of
12+
silently accepting them: non-integer and out-of-range `u32`/`i32` values (the
13+
SDK encoded these verbatim) and out-of-range wide integers such as `u64`
14+
`2^64` (the SDK silently wrapped these to `0`) now raise a clear
15+
`ScValEncodeError`.
16+
- DWARF type resolution no longer hangs on malformed debug info containing a
17+
cyclic `typedef`/qualifier chain; `stripTypedefs` now terminates on cycles.
18+
19+
[Unreleased]: https://github.com/runtimeverification/simbolik-komet/compare/v0.0.1...HEAD
20+
721
## [0.0.1]
822

923
Initial release: time-travel debugging for Stellar/Soroban smart contracts, with

0 commit comments

Comments
 (0)