Skip to content

Commit f65ada1

Browse files
authored
Merge pull request #273 from objectstack-ai/copilot/update-automation-test-reports
2 parents e3179b3 + 371add2 commit f65ada1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.storybook/test-runner.cjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
*/
44
module.exports = {
55
async preVisit(page) {
6-
// Inject __test global to prevent ReferenceError during test execution
7-
// This addresses the error: "page.evaluate: ReferenceError: __test is not defined"
8-
// that occurs when running Storybook test-runner smoke tests
6+
// Inject __test global as a no-op function to satisfy test-runner expectations
7+
// The test-runner expects __test to be a function, not a boolean value
8+
// This addresses the error: "page.evaluate: TypeError: __test is not a function"
99
await page.evaluate(() => {
10-
window.__test = true;
10+
window.__test = () => {};
1111
});
1212
},
1313
};

0 commit comments

Comments
 (0)