forked from patternfly/patternfly-elements
-
Notifications
You must be signed in to change notification settings - Fork 0
/
web-test-runner.config.js
35 lines (34 loc) · 1.16 KB
/
web-test-runner.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import { pfeTestRunnerConfig } from '@patternfly/pfe-tools/test/config.js';
import { a11ySnapshotPlugin } from '@web/test-runner-commands/plugins';
import { getPatternflyIconNodemodulesImports } from '@patternfly/pfe-tools/dev-server/config.js';
export default pfeTestRunnerConfig({
// workaround for https://github.com/evanw/esbuild/issues/3019
tsconfig: 'tsconfig.esbuild.json',
files: ['!tools/create-element/templates/**/*'],
reporter: process.env.CI ? 'summary' : 'default',
importMapOptions: {
providers: {
'zero-md': 'nodemodules',
'@patternfly/icons': 'nodemodules',
'@patternfly/elements': 'monorepotypescript',
'@patternfly/pfe-tools': 'monorepotypescript',
'@patternfly/pfe-core': 'monorepotypescript',
},
inputMap: {
imports: {
'@patternfly/pfe-tools/environment.js': './_site/tools/environment.js',
...await getPatternflyIconNodemodulesImports(import.meta.url),
},
},
},
plugins: [
a11ySnapshotPlugin(),
],
middleware: [
async function(ctx) {
if (ctx.path.match(/@patternfly\/icons\/.*\.js/)) {
ctx.redirect(`/node_modules/${ctx.path}`);
}
},
],
});