Initial commit
This commit is contained in:
13
apps/storybook/test-runner.config.ts
Normal file
13
apps/storybook/test-runner.config.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import type { TestRunnerConfig } from "@storybook/test-runner";
|
||||
|
||||
const config: TestRunnerConfig = {
|
||||
async preVisit(page) {
|
||||
page.on("console", (msg) => {
|
||||
if (msg.type() === "error") {
|
||||
throw new Error(`Console error in story: ${msg.text()}`);
|
||||
}
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
export default config;
|
||||
Reference in New Issue
Block a user