File tree Expand file tree Collapse file tree 1 file changed +2
-16
lines changed Expand file tree Collapse file tree 1 file changed +2
-16
lines changed Original file line number Diff line number Diff line change @@ -25,24 +25,10 @@ async function getOptions() {
25
25
}
26
26
}
27
27
28
- // Keep a locally cached 'page' object so that we
29
- // don't have to request the browser instance to
30
- // create a new one for each request.
31
- let _page
32
-
33
- async function getPage ( ) {
34
- if ( _page ) {
35
- return _page
36
- }
37
-
28
+ exports . extractCss = async url => {
38
29
const options = await getOptions ( )
39
30
const browser = await puppeteer . launch ( options )
40
- _page = await browser . newPage ( ) // eslint-disable-line
41
- return _page
42
- }
43
-
44
- exports . extractCss = async url => {
45
- const page = await getPage ( )
31
+ const page = await browser . newPage ( )
46
32
47
33
// Start CSS coverage. This is the meat and bones of this module
48
34
await page . coverage . startCSSCoverage ( ) . catch ( ( ) => { } )
You can’t perform that action at this time.
0 commit comments