Skip to content

Commit 2ffb2b3

Browse files
authored
chore: simplify web-test-runner theme plugins config (#9920)
1 parent e755273 commit 2ffb2b3

File tree

2 files changed

+8
-14
lines changed

2 files changed

+8
-14
lines changed

web-dev-server.config.js

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -108,15 +108,10 @@ export default {
108108
},
109109
esbuildPlugin({ ts: true }),
110110

111-
// yarn start
112-
theme === 'base' && enforceThemePlugin('base'),
111+
// Used by all themes
112+
enforceThemePlugin(theme),
113113

114-
// yarn start --theme=lumo
115-
theme === 'lumo' && enforceThemePlugin('lumo'),
116-
theme === 'lumo' && cssImportPlugin(),
117-
118-
// yarn start --theme=aura
119-
theme === 'aura' && enforceThemePlugin('aura'),
120-
theme === 'aura' && cssImportPlugin(),
114+
// Lumo / Aura CSS
115+
['lumo', 'aura'].includes(theme) && cssImportPlugin(),
121116
].filter(Boolean),
122117
};

wtr-utils.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -332,12 +332,11 @@ const createVisualTestsConfig = (theme, browserVersion) => {
332332
update: process.env.TEST_ENV === 'update',
333333
}),
334334

335-
// yarn test:base
336-
theme === 'base' && enforceThemePlugin('base'),
335+
// Used by all themes
336+
enforceThemePlugin(theme),
337337

338-
// yarn test:lumo (uses legacy lumo styles defined in js files)
339-
theme === 'lumo' && enforceThemePlugin('lumo'),
340-
theme === 'lumo' && cssImportPlugin(),
338+
// Lumo / Aura CSS
339+
['lumo', 'aura'].includes(theme) && cssImportPlugin(),
341340
].filter(Boolean),
342341
groups,
343342
testRunnerHtml: getTestRunnerHtml(),

0 commit comments

Comments
 (0)