Skip to content

Commit 643249c

Browse files
committed
Remove karma and mocha
1 parent 445e504 commit 643249c

File tree

7 files changed

+49
-1046
lines changed

7 files changed

+49
-1046
lines changed

.github/workflows/continuous-integration.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
run: |
2828
yarn typecheck
2929
- name: Test
30-
run: yarn test:vitest
30+
run: yarn test
3131
- name: Upload coverage report
3232
uses: codecov/codecov-action@v4
3333
with:

gulpfile.js

+1-17
Original file line numberDiff line numberDiff line change
@@ -157,23 +157,7 @@ gulp.task(
157157
gulp.parallel('build-css', () =>
158158
runTests({
159159
bootstrapFile: 'src/sidebar/test/bootstrap.js',
160-
karmaConfig: 'src/karma.config.cjs',
161-
rollupConfig: 'rollup-tests.config.js',
162-
testsPattern: 'src/**/*-test.js',
163-
}),
164-
),
165-
);
166-
167-
// Unit and integration testing tasks.
168-
//
169-
// Some (eg. a11y) tests rely on CSS bundles. We assume that JS will always take
170-
// longer to build than CSS, so build in parallel.
171-
gulp.task(
172-
'test:vitest',
173-
gulp.parallel('build-css', () =>
174-
runTests({
175-
bootstrapFile: 'src/sidebar/test/bootstrap.js',
176-
vitestConfig: './vitest.config.js',
160+
vitestConfig: 'vitest.config.js',
177161
rollupConfig: 'rollup-tests.config.js',
178162
testsPattern: 'src/**/*-test.js',
179163
}),

package.json

+1-9
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"@types/dompurify": "^3.0.0",
3333
"@types/escape-html": "^1.0.1",
3434
"@types/katex": "^0.16.0",
35-
"@types/mocha": "^10.0.10",
35+
"@types/node": "^22.14.1",
3636
"@types/retry": "^0.12.1",
3737
"@types/scroll-into-view": "^1.16.0",
3838
"@types/shallowequal": "^1.1.1",
@@ -70,15 +70,8 @@
7070
"globals": "^16.0.0",
7171
"gulp": "^5.0.0",
7272
"gulp-changed": "^5.0.1",
73-
"karma": "^6.0.1",
74-
"karma-chrome-launcher": "^3.1.0",
75-
"karma-coverage-istanbul-reporter": "^3.0.2",
76-
"karma-mocha": "^2.0.0",
77-
"karma-mocha-reporter": "^2.0.4",
78-
"karma-source-map-support": "^1.4.0",
7973
"katex": "^0.16.0",
8074
"lodash.debounce": "^4.0.3",
81-
"mocha": "11.1.0",
8275
"mustache": "^4.0.1",
8376
"mustache-express": "^1.3.2",
8477
"npm-packlist": "^10.0.0",
@@ -123,7 +116,6 @@
123116
"checkformatting": "prettier --cache --check '**/*.{js,scss,ts,tsx,d.ts}'",
124117
"format": "prettier --cache --list-different --write '**/*.{js,scss,ts,tsx,d.ts}'",
125118
"test": "gulp test",
126-
"test:vitest": "gulp test:vitest",
127119
"test:watch": "gulp test --live",
128120
"typecheck": "tsc --build tsconfig.json"
129121
},

src/karma.config.cjs

-65
This file was deleted.

src/sidebar/test/bootstrap.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ import { patch } from '../../test-util/assert-methods';
1111
sinon.assert.expose(assert, { prefix: null });
1212
patch(assert);
1313

14-
// Expose these globally, to avoid dependency on outdated karma-chai and
15-
// karma-sinon plugins
14+
// Expose these globally
1615
globalThis.assert = assert;
1716
globalThis.sinon = sinon;
1817
globalThis.context ??= globalThis.describe;

src/tsconfig.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
"exclude": [
2828
// Tests are not checked.
2929
"**/test/**/*.js",
30-
"test-util/**/*.js",
31-
"karma.config.js"
30+
"test-util/**/*.js"
3231
]
3332
}

0 commit comments

Comments
 (0)