[英]Unit test service worker
我想知道是否有專門用於對服務工作者進行單元測試的庫,或者是否有任何方法可以模擬安裝和其他事件以檢查其是否按預期工作。
你應該先谷歌吧? :-)
閱讀這個由谷歌的馬特·岡特優秀的文章,並檢查了如何做大服務人員的圖書館之一,SW工具箱在實現他們的圖書館測試在這里 。
您可以使用包service-worker-mock 。 服務工人模擬
service-worker-mock
我相信這些材料將是一個很好的參考點,使服務人員的測試變得容易
[英]How to test the angular service worker
[英]Unit test Angular service
[英]Unit test for fromEvent in service
[英]How to unit test a service in angular unit testing?
[英]Angular8 service unit test
[英]Unit Test nested service with subscription
[英]Angular unit test mocking a service
[英]Unit test for method that uses a service
[英]Unit test Angular 2 service subject
[英]Angular 8 - Unit test for abstract service
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.