-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(plugin): make plugin a "no-op" in unsupported browsers #460
feat(plugin): make plugin a "no-op" in unsupported browsers #460
Conversation
Code Climate has analyzed commit d5d5ea9 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 92.4%. View more on Code Climate. |
We now enforce the precondition immediately, before we do anything else. This ensures the precondition error wouldn't be masked by a different problem.
Without proper setup, this test would start failing if we change the behavior to be a "no-op" in unsupported browsers.
2c2f3ca
to
22e6cdf
Compare
Previously the plugin would throw an error when it was running in an unsupported browser. This was not great for plugin consumers who run their cypress tests in both supported and unsupported browsers and are fine with only having HAR recording in supported browsers: It forced them to conditionally enable this plugin. To address this, we're changing the plugin to do nothing except `warn` that HAR recording is not supported when running in an unsupported browser.
22e6cdf
to
d5d5ea9
Compare
@rmacklin thanks for contributing! Great work 💪🏾 |
Thank you @derevnjuk! Hoping to switch away from my fork as soon as there's a new release published :) Edit: Oh, I see you already done that - awesome! |
Addresses #5 (comment)
Previously the plugin would throw an error when it was running in an unsupported browser. This was not great for plugin consumers who run their cypress tests in both supported and unsupported browsers and are fine with only having HAR recording in supported browsers: It forced them to conditionally enable this plugin.
To address this, we're changing the plugin to do nothing except
warn
that HAR recording is not supported when running in an unsupported browser.