Skip to content

Commit 886cd5d

Browse files
authored
docs: update README.md to clarify plugin loading (#125)
clarify plugin loading process when running as a `component` instead of `e2e`. Co-authored-by: byron wall <[email protected]>
1 parent 2b42053 commit 886cd5d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,16 @@ import { defineConfig } from 'cypress';
8787
import { initPlugin } from '@frsource/cypress-plugin-visual-regression-diff/plugins';
8888

8989
export default defineConfig({
90-
// setupNodeEvents can be defined in either
91-
// the e2e or component configuration
90+
// initPlugin must be called in the section where it is used: e2e or component
9291
e2e: {
9392
setupNodeEvents(on, config) {
9493
initPlugin(on, config);
9594
}
95+
},
96+
component: {
97+
setupNodeEvents(on, config) {
98+
initPlugin(on, config);
99+
}
96100
}
97101
});
98102
```

0 commit comments

Comments
 (0)