Skip to content

Commit 389f678

Browse files
committed
test(wtr): clean up setup
1 parent 1278d69 commit 389f678

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/@lwc/integration-not-karma/web-test-runner.config.mjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import * as options from './helpers/options.mjs';
44

55
const pluck = (obj, keys) => Object.fromEntries(keys.map((k) => [k, Boolean(obj[k])]));
66

7+
/** `process.env` to inject into test environment. */
78
const env = {
89
...pluck(options, [
910
'API_VERSION',
@@ -135,10 +136,9 @@ export default {
135136
<body>
136137
<script type="module">
137138
globalThis.process = ${JSON.stringify({ env })};
138-
globalThis.lwcRuntimeFlags = ${JSON.stringify({
139-
DISABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE:
140-
env.DISABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE,
141-
})};
139+
globalThis.lwcRuntimeFlags = ${JSON.stringify(
140+
pluck(options, ['DISABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE'])
141+
)};
142142
</script>
143143
<script type="module" src="./helpers/setup.mjs"></script>
144144
<script type="module" src="./helpers/wtr-utils.mjs"></script>

0 commit comments

Comments
 (0)