With npm:
npm install --save quilted
With yarn:
yarn add quilted
quilted <url> [options]
import quilted from 'quilted';
quilted('https://example.com').then(coverage => {
// ...
});
$ quilted --help
Usage: quilted <url> [options]
Basic options:
--no-css disables css code coverage [boolean]
--no-js disables js code coverage [boolean]
--origin, -o only cover same-origin assets [boolean]
Puppeteer options:
--timeout, -t maximum number of milliseconds to wait for the browser
to start [number]
--viewportWidth, --vw sets viewport width for page render [number]
--viewportHeight, --vh sets viewport height for page render [number]
--viewport, -V sets viewport for page render i.e. 800x600 [string]
--userAgent, --ua sets the user agent for the request [string]
--headers, -H sets headers for the page request
example: $0 <url> -H "X-Header: 123" [array]
Options:
--version, -v Show version number [boolean]
--help Show help [boolean]
Option | Description | Default |
---|---|---|
js |
Run js coverage. | true |
css |
Run css coverage. | true |
sameOrigin |
Only cover requests from the same origin | false |
Option | Description | Default |
---|---|---|
args |
Chrome command line flags | null |
timeout |
Maximum number of milliseconds to wait for the browser to start | 30000 |
cookies |
Set cookies for the page request. | null |
headers |
Set headers for the page request. | null |
userAgent |
Sets the user agent for the page request. | Default Chrome Headless User Agent String |
viewport |
Sets the viewport size for the page request. | 800x600 |