browsertime 24.0.0-alpha.4 → 24.0.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/support/xvfb.js +7 -0
- package/package.json +1 -1
package/lib/support/xvfb.js
CHANGED
|
@@ -3,6 +3,9 @@ import { xvfbDisplay } from '../video/defaults.js';
|
|
|
3
3
|
import { getViewPort } from '../support/getViewPort.js';
|
|
4
4
|
import { getProperty } from '../support/util.js';
|
|
5
5
|
import { isAndroidConfigured } from '../android/index.js';
|
|
6
|
+
import { getLogger } from '@sitespeed.io/log';
|
|
7
|
+
|
|
8
|
+
const logger = getLogger('browsertime');
|
|
6
9
|
|
|
7
10
|
function buildXvfbCommand({ display, screen = 0, size, silent }) {
|
|
8
11
|
return {
|
|
@@ -43,6 +46,10 @@ export async function startXvfb({ size, options }) {
|
|
|
43
46
|
detached: true
|
|
44
47
|
});
|
|
45
48
|
|
|
49
|
+
xvfbProcess.catch(error => {
|
|
50
|
+
logger.error('Failed xvfb:', error);
|
|
51
|
+
});
|
|
52
|
+
|
|
46
53
|
const waitToSettle = getProperty(options, 'xvfbParams.waitToSettle', 500);
|
|
47
54
|
await new Promise(resolve => {
|
|
48
55
|
setTimeout(resolve, waitToSettle);
|
package/package.json
CHANGED