-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make existing smoketest run using smokehouse (#788)
* transfer npm run smoke to using smokehouse * run smokehouse subprocess with --harmony if needed
- Loading branch information
1 parent
b446a81
commit 41a5cfe
Showing
7 changed files
with
67 additions
and
53 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
44 changes: 44 additions & 0 deletions
44
lighthouse-cli/test/smokehouse/offline-local/offline-expectations.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/** | ||
* @license | ||
* Copyright 2016 Google Inc. All rights reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
'use strict'; | ||
|
||
/** | ||
* Expected Lighthouse audit values for local test pages, one of which works | ||
* offline with a service worker and one of which does not. Tests against audits | ||
* defined in 'offline-config.json'. | ||
*/ | ||
module.exports = [ | ||
{ | ||
initialUrl: 'http://localhost:10200/online-only.html', | ||
url: 'http://localhost:10200/online-only.html', | ||
audits: { | ||
'service-worker': false, | ||
'works-offline': false, | ||
'viewport': true | ||
} | ||
}, | ||
|
||
{ | ||
initialUrl: 'http://localhost:10503/offline-ready.html', | ||
url: 'http://localhost:10503/offline-ready.html', | ||
audits: { | ||
'service-worker': true, | ||
'works-offline': true, | ||
'viewport': true | ||
} | ||
} | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env bash | ||
|
||
node lighthouse-cli/test/fixtures/static-server.js & | ||
|
||
sleep 0.5s | ||
|
||
config="lighthouse-cli/test/smokehouse/offline-local/offline-config.json" | ||
expectations="lighthouse-cli/test/smokehouse/offline-local/offline-expectations.js" | ||
|
||
# run smoketest, expecting results found in offline-expectations | ||
npm run -s smokehouse -- --config-path=$config --expectations-path=$expectations | ||
exit_code=$? | ||
|
||
# kill test servers | ||
kill $(jobs -p) | ||
|
||
exit "$exit_code" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters