Skip to content

Commit cc9a697

Browse files
authored
chore: sayonara, karma! (#5590)
* chore: remove integration-karma directory * chore: update references to integration-karma * chore: remove more references to karma * chore: update lockfile to remove karma deps
1 parent e4c3794 commit cc9a697

File tree

3,197 files changed

+103
-61541
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,197 files changed

+103
-61541
lines changed

.github/workflows/karma.yml

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

ARCHITECTURE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ Some other polyfills are not separate packages but instead part of LWC's core lo
143143

144144
There are several private internal packages for tests and performance benchmarking:
145145

146-
- `@lwc/integration-karma`: primary client-side LWC test suite, using Karma
147-
- `@lwc/integration-tests`: WebDriverIO tests, used for anything Karma can't do, such as user agent gestures such as changing focus
146+
- `@lwc/integration-not-karma`: primary client-side LWC test suite, using Web Test Runner
147+
- `@lwc/integration-tests`: WebDriverIO tests, used for anything WTR can't do, such as user agent gestures such as changing focus
148148
- `@lwc/integration-types`: TypeScript tests, i.e. tests for the types themselves
149149
- `@lwc/perf-benchmarks`: Performance micro-benchmarks for either Best or Tachometer
150150
- `@lwc/perf-benchmarks-components`: Collection of components used by the above (split into a separate package due to Tachometer restrictions)

CONTRIBUTING.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,19 +97,19 @@ Test fixtures are file-based tests that are executed using a helper called [`tes
9797

9898
When developing LWC, use integration testing to ensure functionality is correctly reflected in the browser. This repo has two integration test suites.
9999

100-
- @lwc/integration-karma: Contains all integration tests that can run with javascript only. For information about usage and contribution, refer to this [documentation][integration-karma-readme].
100+
- @lwc/integration-web-test-runner: Contains all integration tests that can run with javascript only. For information about usage and contribution, refer to this [documentation][integration-wtr-readme].
101101
- @lwc/integration-tests: Contains all other integration tests that require web driver API support (e.g., focus, keyboard navigation). For information about usage and contribution, refer to this [documentation][integration-test-readme].
102102

103-
To run the Karma tests from the root:
103+
To run the Web Test Runner tests from the root:
104104

105105
```shell
106-
yarn test:karma
106+
yarn test:wtr
107107
```
108108

109109
To run in watch mode:
110110

111111
```shell
112-
yarn test:karma:start
112+
yarn test:wtr --manual
113113
```
114114

115115
### Performance testing LWC
@@ -347,7 +347,7 @@ The footer should contain any information about **Breaking Changes** and is also
347347
[creating-a-pull-request]: https://help.github.com/articles/creating-a-pull-request/
348348
[eslint-integrations]: http://eslint.org/docs/user-guide/integrations
349349
[integration-test-readme]: https://github.com/salesforce/lwc/blob/master/packages/@lwc/integration-tests/README.md
350-
[integration-karma-readme]: https://github.com/salesforce/lwc/blob/master/packages/@lwc/integration-karma/README.md
350+
[integration-wtr-readme]: https://github.com/salesforce/lwc/blob/master/packages/@lwc/integration-not-karma/README.md
351351

352352
## Getting your changes reviewed
353353

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
alt="unit tests build status">
2020
</a>
2121

22-
<a href="https://github.com/salesforce/lwc/actions/workflows/karma.yml?query=branch%3Amaster">
23-
<img src="https://github.com/salesforce/lwc/actions/workflows/karma.yml/badge.svg"
24-
alt="karma tests build status">
22+
<a href="https://github.com/salesforce/lwc/actions/workflows/web-test-runner.yml?query=branch%3Amaster">
23+
<img src="https://github.com/salesforce/lwc/actions/workflows/web-test-runner.yml/badge.svg"
24+
alt="web-test-runner tests build status">
2525
</a>
2626

2727
<a href="https://github.com/salesforce/lwc/actions/workflows/integration.yml?query=branch%3Amaster">

eslint.config.mjs

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ export default tseslint.config(
218218
},
219219
},
220220
{
221-
files: ['packages/@lwc/integration-karma/**', 'packages/@lwc/integration-not-karma/**'],
221+
files: ['packages/@lwc/integration-not-karma/**'],
222222

223223
languageOptions: {
224224
globals: {
@@ -365,20 +365,6 @@ export default tseslint.config(
365365
},
366366
},
367367
},
368-
{
369-
files: ['packages/@lwc/integration-karma/**'],
370-
371-
languageOptions: {
372-
globals: {
373-
lwcRuntimeFlags: true,
374-
process: true,
375-
LWC: true,
376-
TestUtils: true,
377-
...globals.browser,
378-
...globals.jasmine,
379-
},
380-
},
381-
},
382368
{
383369
files: ['packages/@lwc/synthetic-shadow/**'],
384370

packages/@lwc/engine-core/src/framework/check-version-mismatch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import type { Stylesheet } from '@lwc/shared';
1515

1616
let warned = false;
1717

18-
// Only used in LWC's Karma tests
18+
// Only used in LWC's integration tests
1919
if (process.env.NODE_ENV === 'test-lwc-integration') {
2020
(window as any).__lwcResetWarnedOnVersionMismatch = () => {
2121
warned = false;

packages/@lwc/engine-core/src/framework/component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export function getComponentAPIVersion(Ctor: LightningElementConstructor): APIVe
7575
const apiVersion: APIVersion | undefined = metadata?.apiVersion;
7676

7777
if (isUndefined(apiVersion)) {
78-
// This should only occur in our Karma tests; in practice every component
78+
// This should only occur in our integration tests; in practice every component
7979
// is registered, and so this code path should not get hit. But to be safe,
8080
// return the lowest possible version.
8181
return LOWEST_API_VERSION;

packages/@lwc/engine-core/src/framework/fragment-cache.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const fragmentCache: WeakMap<string[], Element>[] = ArrayFrom(
2424
() => new WeakMap()
2525
);
2626

27-
// Only used in LWC's Karma tests
27+
// Only used in LWC's integration tests
2828
if (process.env.NODE_ENV === 'test-lwc-integration') {
2929
(window as any).__lwcResetFragmentCache = () => {
3030
for (let i = 0; i < fragmentCache.length; i++) {

packages/@lwc/engine-core/src/framework/hot-swaps.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ let activeComponents: WeakMultiMap<LightningElementConstructor, VM> =
3333
/*@__PURE__@*/ new WeakMultiMap();
3434
let activeStyles: WeakMultiMap<Stylesheet, VM> = /*@__PURE__@*/ new WeakMultiMap();
3535

36-
// Only used in LWC's Karma tests
36+
// Only used in LWC's integration tests
3737
if (process.env.NODE_ENV === 'test-lwc-integration') {
3838
// Used to reset the global state between test runs
3939
(window as any).__lwcResetHotSwaps = () => {

packages/@lwc/engine-core/src/framework/stylesheet.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const VALID_SCOPE_TOKEN_REGEX = /^[a-zA-Z0-9\-_]+$/;
3636
let stylesheetsToCssContent: WeakMap<Stylesheet, Set<string>> = /*@__PURE__@*/ new WeakMap();
3737
let cssContentToAbortControllers: Map<string, AbortController> = /*@__PURE__@*/ new Map();
3838

39-
// Only used in LWC's Karma tests
39+
// Only used in LWC's integration tests
4040
if (process.env.NODE_ENV === 'test-lwc-integration') {
4141
// Used to reset the global state between test runs
4242
(window as any).__lwcResetStylesheetCache = () => {

0 commit comments

Comments
 (0)