* fixed registration problem of service worker * added a test for service worker * reused some existing code to avoid code duplication Co-authored-by: Jeffrey Warren <jeff@unterbahn.com>