AllanChain / gridsome-plugin-pwa

Yet another PWA plugin for Gridsome.
MIT License
7 stars 0 forks source link

Refactor server API codes for unit testing #2

Closed AllanChain closed 4 years ago

AllanChain commented 4 years ago

1 has done simple e2e testing. We need more unit testing to make the project more stable.

grisome.client.js is easy to test. just pass options and head = [ link: [], meta: [] ].

We need extract some functions to ease unit testing from server API code.

For example, generateManifest, getWorkboxOptions