14 lines
309 B
TypeScript
14 lines
309 B
TypeScript
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;
|