Skip to content

Commit

Permalink
fix: activate sbb-icons in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jeripeierSBB committed May 2, 2024
1 parent 2e546d8 commit fdf7007
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/core/testing/test-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ function setupIconConfig(): void {
mergeConfig({ icon });
}

setupIconConfig();
if (!(globalThis as unknown as { isVisualRegressionRun: boolean }).isVisualRegressionRun) {
setupIconConfig();
}

if (isHydratedSsr()) {
await import('@lit-labs/ssr-client/lit-element-hydrate-support.js');
Expand Down
1 change: 1 addition & 0 deletions web-test-runner.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ const testRunnerHtml = (testFramework, _config, group) => `
<script>
globalThis.testEnv = '${isDebugMode ? 'debug' : ''}';
globalThis.testGroup = '${groupNameOverride ?? group?.name ?? 'default'}';
globalThis.isVisualRegressionRun = ${visualRegressionRun};
</script>
</head>
<body class="sbb-disable-animation">
Expand Down

0 comments on commit fdf7007

Please sign in to comment.