Skip to content

Commit

Permalink
feat(real-time): add real-time package (#3023)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nicojs authored Feb 22, 2024
1 parent 202bfae commit c887bf9
Show file tree
Hide file tree
Showing 35 changed files with 823 additions and 172 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@ jobs:
- run: npm run download-incremental-reports
- name: Run Stryker incrementally
run: |
npx nx run-many --target=stryker --projects=metrics,elements -- --incremental
npx nx run-many --target=stryker --projects=metrics,elements,real-time -- --incremental
env:
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
8 changes: 5 additions & 3 deletions .github/workflows/mutation-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
workflow_dispatch:

jobs:
metrics:
nodejs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -16,8 +16,10 @@ jobs:
node-version: 20.x
cache: 'npm'
- run: npm ci
- name: Run Stryker
run: npx nx run metrics:stryker
- run: npx nx run metrics:stryker
env:
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
- run: npx nx run real-time:stryker
env:
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
elements:
Expand Down
6 changes: 3 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
"name": "Mocha unit tests",
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
"args": [
"-r",
"source-map-support/register",
"--timeout",
"999999",
"--colors",
"${workspaceFolder}/packages/report-schema/dist/test/**/*.js",
"${workspaceFolder}/packages/metrics/dist/test/**/*.js"
"${workspaceFolder}/packages/metrics/dist/test/**/*.js",
"${workspaceFolder}/packages/real-time/dist/test/**/*.js"
],
"runtimeArgs": ["--enable-source-maps"],
"internalConsoleOptions": "openOnSessionStart"
}
]
Expand Down
179 changes: 159 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"@types/chai": "4.3.11",
"@types/mocha": "10.0.6",
"@types/node": "20.11.19",
"@types/sinon": "^17.0.3",
"chai": "4.4.1",
"json-schema-to-typescript": "13.1.2",
"lerna": "8.1.2",
Expand All @@ -49,7 +50,7 @@
"prettier": "3.2.5",
"prettier-plugin-tailwindcss": "0.5.11",
"rimraf": "5.0.5",
"source-map-support": "0.5.21",
"sinon": "^17.0.1",
"typescript": "5.3.3"
}
}
1 change: 1 addition & 0 deletions packages/elements/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
"lit": "3.1.2",
"mutation-testing-metrics": "3.0.2",
"mutation-testing-report-schema": "3.0.2",
"mutation-testing-real-time": "3.0.2",
"postcss": "8.4.35",
"prism-svelte": "0.5.0",
"prismjs": "1.29.0",
Expand Down
5 changes: 2 additions & 3 deletions packages/elements/src/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{
"extends": "../../../tsconfig.settings.json",
"extends": "../tsconfig.elements.settings.json",
"compilerOptions": {
"types": ["vite/client"],
"outDir": "../dist-tsc/src",
"emitDeclarationOnly": true,
"lib": ["es2022", "dom", "dom.iterable"]
"emitDeclarationOnly": true
},
"references": [
{
Expand Down
Loading

0 comments on commit c887bf9

Please sign in to comment.