Skip to content

Commit e8eea74

Browse files
committed
Remove karma and mocha
1 parent ef06f47 commit e8eea74

File tree

7 files changed

+26
-1044
lines changed

7 files changed

+26
-1044
lines changed

gulpfile.js

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -55,22 +55,8 @@ gulp.task(
5555
runTests({
5656
bootstrapFile: 'test/bootstrap.js',
5757
rollupConfig: 'rollup-tests.config.js',
58-
karmaConfig: 'src/karma.config.cjs',
59-
testsPattern: 'src/**/*-test.js',
60-
}),
61-
),
62-
);
63-
64-
// Some (eg. a11y) tests rely on CSS bundles. We assume that JS will always take
65-
// longer to build than CSS, so build in parallel.
66-
gulp.task(
67-
'test:vitest',
68-
gulp.parallel('build-test-css', () =>
69-
runTests({
70-
bootstrapFile: 'test/bootstrap.js',
71-
rollupConfig: 'rollup-tests.config.js',
72-
testsPattern: 'src/**/*-test.js',
7358
vitestConfig: './vitest.config.js',
59+
testsPattern: 'src/**/*-test.js',
7460
}),
7561
),
7662
);

package.json

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,6 @@
4040
"fancy-log": "^2.0.0",
4141
"globals": "^16.0.0",
4242
"gulp": "^5.0.0",
43-
"karma": "^6.3.4",
44-
"karma-chrome-launcher": "^3.1.0",
45-
"karma-coverage-istanbul-reporter": "^3.0.3",
46-
"karma-mocha": "^2.0.0",
47-
"karma-mocha-reporter": "^2.0.4",
48-
"karma-source-map-support": "^1.4.0",
49-
"mocha": "11.1.0",
5043
"mustache": "^4.2.0",
5144
"playwright": "^1.51.1",
5245
"postcss": "^8.3.9",
@@ -67,15 +60,14 @@
6760
"preact": "^10.25.1"
6861
},
6962
"scripts": {
70-
"build-lib": "babel src/ --out-dir lib/ --extensions '.js,.ts,.tsx' --source-maps --ignore '**/test' --ignore '**/karma.config.js'",
63+
"build-lib": "babel src/ --out-dir lib/ --extensions '.js,.ts,.tsx' --source-maps --ignore '**/test'",
7164
"build": "yarn build-lib && tsc --build src/tsconfig.json",
7265
"build-pattern-lib": "yarn gulp bundle-css && yarn rollup -c rollup.config.js",
7366
"typecheck": "tsc --build src/tsconfig.json",
7467
"lint": "eslint --cache .",
7568
"checkformatting": "prettier --cache --check '**/*.{js,scss,ts,tsx,md}'",
7669
"format": "prettier --cache --list-different --write '**/*.{js,scss,ts,tsx,md}'",
7770
"test": "gulp test",
78-
"test:vitest": "gulp test:vitest",
7971
"push": "yarn build && yalc push"
8072
},
8173
"prettier": {

src/components/transition/Slider.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ const Slider: TransitionComponent = ({
8282
// See https://bugs.chromium.org/p/chromium/issues/detail?id=961193
8383
//
8484
// @ts-ignore
85-
// eslint-disable-next-line react/no-unknown-property
8685
ontransitionend={handleTransitionEnd}
8786
ref={containerRef}
8887
style={{

src/karma.config.cjs

Lines changed: 0 additions & 79 deletions
This file was deleted.

src/tsconfig.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
"include": ["**/*.ts", "**/*.js", "**/*.tsx", "types/*.d.ts"],
2222
"exclude": [
2323
// Tests are not checked.
24-
"**/test/**/*.js",
25-
"karma.config.js"
24+
"**/test/**/*.js"
2625
]
2726
}

test/bootstrap.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ import sinon from 'sinon';
88
// Expose the sinon assertions.
99
sinon.assert.expose(assert, { prefix: null });
1010

11-
// Expose these globally, to avoid dependency on outdated karma-chai and
12-
// karma-sinon plugins
11+
// Expose these globally, to use with vitest
1312
globalThis.assert = assert;
1413
globalThis.sinon = sinon;
1514
globalThis.context = globalThis.context ?? globalThis.describe;

0 commit comments

Comments
 (0)