Financial-Times / n-service-worker

❌ DECOMMISSIONED Global service worker component for next.ft.com
5 stars 2 forks source link

Tests and domain #116

Closed wheresrhys closed 6 years ago

wheresrhys commented 7 years ago

Almost every request we want to cache is now same domain in prod, which affords greta opportunities for testing (no more opaque requests), but on the other hand makes testing difficult because we want to attain same domain-ness in all environments (karma test server, local dev sites, prod) without introducing arbitrary conditionals.

Something to mull over

wheresrhys commented 7 years ago

Hmmm, the test service worker wraps the prod one, so could set some global state used to set domains.