Skip to content
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

How do I test my custom service-worker code #127

Open
CodingDive opened this issue Aug 30, 2018 · 0 comments
Open

How do I test my custom service-worker code #127

CodingDive opened this issue Aug 30, 2018 · 0 comments

Comments

@CodingDive
Copy link

Hey, thank you for the great addons.
I wrote some logic inside the service-worker folder and now want to test it.
My first question is if it is possible to write unit tests for functions. After the build process I can no longer import and execute functions from my tests since they are bundled inside the sw.js file. Is there maybe a way to execute tests in the context of the service-worker or any other workarround?
What about integration tests? According to this medium post there seems to be a lot of ways to write integration tests. Is there any preferred way for this addon?

Thank you in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant