Skip to content

Commit c887bf9

Browse files
authored
feat(real-time): add real-time package (#3023)
Add real-time package. It is a helper package to help with the nodejs side of a real-time report. It abstracts away all the nitty gritty server-send events stuff underneath.
1 parent 202bfae commit c887bf9

35 files changed

+823
-172
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,6 @@ jobs:
6464
- run: npm run download-incremental-reports
6565
- name: Run Stryker incrementally
6666
run: |
67-
npx nx run-many --target=stryker --projects=metrics,elements -- --incremental
67+
npx nx run-many --target=stryker --projects=metrics,elements,real-time -- --incremental
6868
env:
6969
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}

.github/workflows/mutation-testing.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
workflow_dispatch:
88

99
jobs:
10-
metrics:
10+
nodejs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v4
@@ -16,8 +16,10 @@ jobs:
1616
node-version: 20.x
1717
cache: 'npm'
1818
- run: npm ci
19-
- name: Run Stryker
20-
run: npx nx run metrics:stryker
19+
- run: npx nx run metrics:stryker
20+
env:
21+
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
22+
- run: npx nx run real-time:stryker
2123
env:
2224
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
2325
elements:

.vscode/launch.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
"name": "Mocha unit tests",
1111
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
1212
"args": [
13-
"-r",
14-
"source-map-support/register",
1513
"--timeout",
1614
"999999",
1715
"--colors",
1816
"${workspaceFolder}/packages/report-schema/dist/test/**/*.js",
19-
"${workspaceFolder}/packages/metrics/dist/test/**/*.js"
17+
"${workspaceFolder}/packages/metrics/dist/test/**/*.js",
18+
"${workspaceFolder}/packages/real-time/dist/test/**/*.js"
2019
],
20+
"runtimeArgs": ["--enable-source-maps"],
2121
"internalConsoleOptions": "openOnSessionStart"
2222
}
2323
]

package-lock.json

Lines changed: 159 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"@types/chai": "4.3.11",
4242
"@types/mocha": "10.0.6",
4343
"@types/node": "20.11.19",
44+
"@types/sinon": "^17.0.3",
4445
"chai": "4.4.1",
4546
"json-schema-to-typescript": "13.1.2",
4647
"lerna": "8.1.2",
@@ -49,7 +50,7 @@
4950
"prettier": "3.2.5",
5051
"prettier-plugin-tailwindcss": "0.5.11",
5152
"rimraf": "5.0.5",
52-
"source-map-support": "0.5.21",
53+
"sinon": "^17.0.1",
5354
"typescript": "5.3.3"
5455
}
5556
}

packages/elements/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
"lit": "3.1.2",
6565
"mutation-testing-metrics": "3.0.2",
6666
"mutation-testing-report-schema": "3.0.2",
67+
"mutation-testing-real-time": "3.0.2",
6768
"postcss": "8.4.35",
6869
"prism-svelte": "0.5.0",
6970
"prismjs": "1.29.0",

packages/elements/src/tsconfig.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
{
2-
"extends": "../../../tsconfig.settings.json",
2+
"extends": "../tsconfig.elements.settings.json",
33
"compilerOptions": {
44
"types": ["vite/client"],
55
"outDir": "../dist-tsc/src",
6-
"emitDeclarationOnly": true,
7-
"lib": ["es2022", "dom", "dom.iterable"]
6+
"emitDeclarationOnly": true
87
},
98
"references": [
109
{

0 commit comments

Comments
 (0)