Replies: 1 comment 2 replies
-
I would actually propose to just use workaround no 1 as an official way to overcome this issue. IMO it's nicer to try to have similar API for all of the plugins (ergo - having the same But I think we can rewrite docs a bit to actually encourage using |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
in the Getting Started guide there is this example cypress.config.ts file
would it be possible to rename the initPlugin method to
initVisualRegressionPlugin
or something like that that includes the name of the plugin?reason: if I have several plugins installed this line
initPlugin(on, config);
on it's own does not provide any context as to which plugin it is initializing.I know this would be a breaking change so we might have to wait for the next major release and I am also aware that I can "Solve" this by aliasing the import so a couple of questions:
Work around 1
import { initPlugin as initVisualRegressionPlugin } from '@frsource/cypress-plugin-visual-regression-diff/dist/plugins';
with the corresponding setupNodeEvents change of
initVisualRegressionPlugin(on, config);
Work around 2
import * as frsourceVisualRegressionDiff from '@frsource/cypress-plugin-visual-regression-diff/dist/plugins';
and
frsourceVisualRegressionDiff.initPlugin(on, config);
Beta Was this translation helpful? Give feedback.
All reactions