Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
freekmurze committed May 6, 2024
1 parent d8ea904 commit 0b6c058
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"type": "commonjs"
}
}
1 change: 1 addition & 0 deletions tests/IntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// remove "performance" as that key is sometimes empty
// on GitHub actions due to less powerful hardware
$expectedCategories = Arr::without(Category::values(), Category::Performance->value);
$expectedCategories = Arr::without($expectedCategories, Category::ProgressiveWebApp->value);

expect($scores)->toHaveKeys($expectedCategories);
});
Expand Down
4 changes: 2 additions & 2 deletions tests/LighthouseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@
});

it('can set a screen emulation', function () {
$screenEmulation = ['disabled' => true];
$this->lighthouse->screenEmulation($screenEmulation);
$screenEmulation = ['mobile' => false, 'disabled' => true];
$this->lighthouse->screenEmulation(disabled: true);

expect($this->lighthouse->lighthouseScriptArguments('lighthouseConfig.settings.screenEmulation'))
->toEqual($screenEmulation);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ chromeOptions:
chromeFlags: ['--headless']
lighthouseConfig:
extends: 'lighthouse:default'
settings: { onlyCategories: [performance, accessibility, best-practices, seo, pwa], emulatedFormFactor: desktop, output: [json, html], disableNetworkThrottling: true, disableCpuThrottling: true, throttlingMethod: provided }
settings: { onlyCategories: [performance, accessibility, best-practices, seo, pwa], formFactor: desktop, output: [json, html], disableNetworkThrottling: true, disableCpuThrottling: true, throttlingMethod: provided, screenEmulation: { disabled: true } }
timeout: 59300

0 comments on commit 0b6c058

Please sign in to comment.