1

I Want to know if there is library specific to unit test the service-worker.Or if there is any way to mock the install and other events to check wheather it's working as expected.

2 Answers 2

2

You should have googled first, right? :-)

Read this excellent article by Matt Gaunt of Google and check out how one of the bigger Service Worker libraries, SW Toolbox implements their library testing over here.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks, btw I checked this article before posting this question, but my aim is to get more recommendation on it
Ha! Ok! I suppose next time you should tell that in your question :-)
2

You can use a package service-worker-mock. service-worker-mock

I believe this material would be a great reference point Service Worker Testing Made Easy

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.