Skip to content

Commit 15068bd

Browse files
karolklppaulirish
authored andcommitted
Lowercase fix for "service worker" (#2729)
1 parent 1ca40de commit 15068bd

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

lighthouse-core/audits/cache-start-url.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class CacheStartUrl extends Audit {
5050

5151
// Now find the start_url in the cacheContents. This test is less than ideal since the Service
5252
// Worker can rewrite a request from the start URL to anything else in the cache, and so a TODO
53-
// here would be to resolve this more completely by asking the Service Worker about the start
53+
// here would be to resolve this more completely by asking the service worker about the start
5454
// URL. However that would also necessitate the cache contents gatherer relying on the manifest
5555
// gather rather than being independent of it.
5656
const cacheContents = artifacts.CacheContents;

lighthouse-core/audits/service-worker.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ class ServiceWorker extends Audit {
1616
return {
1717
category: 'Offline',
1818
name: 'service-worker',
19-
description: 'Registers a Service Worker',
20-
failureDescription: 'Does not register a Service Worker',
19+
description: 'Registers a service worker',
20+
failureDescription: 'Does not register a service worker',
2121
helpText: 'The service worker is the technology that enables your app to use many ' +
2222
'Progressive Web App features, such as offline, add to homescreen, and push ' +
2323
'notifications. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/registered-service-worker).',

lighthouse-core/audits/webapp-install-banner.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,15 @@ class WebappInstallBanner extends MultiCheckAudit {
7373
static assessServiceWorker(artifacts, result) {
7474
const hasServiceWorker = SWAudit.audit(artifacts).rawValue;
7575
if (!hasServiceWorker) {
76-
result.failures.push('Site does not register a Service Worker');
76+
result.failures.push('Site does not register a service worker');
7777
}
7878
}
7979

8080
static assessOfflineStartUrl(artifacts, result) {
8181
const hasOfflineStartUrl = artifacts.StartUrl.statusCode === 200;
8282

8383
if (!hasOfflineStartUrl) {
84-
result.failures.push('Manifest start_url is not cached by a Service Worker');
84+
result.failures.push('Manifest start_url is not cached by a service worker');
8585
}
8686

8787
if (artifacts.StartUrl.debugString) {

lighthouse-core/test/audits/service-worker-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ const assert = require('assert');
1010

1111
/* eslint-env mocha */
1212

13-
describe('Offline: Service Worker audit', () => {
14-
it('passes when given a matching Service Worker version', () => {
13+
describe('Offline: service worker audit', () => {
14+
it('passes when given a matching service worker version', () => {
1515
const output = Audit.audit({
1616
ServiceWorker: {
1717
versions: [{

lighthouse-core/test/audits/webapp-install-banner-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ describe('PWA: webapp install banner audit', () => {
132132

133133
return WebappInstallBannerAudit.audit(artifacts).then(result => {
134134
assert.strictEqual(result.rawValue, false);
135-
assert.ok(result.debugString.includes('Service Worker'), result.debugString);
135+
assert.ok(result.debugString.includes('service worker'), result.debugString);
136136
const failures = result.extendedInfo.value.failures;
137137
// start url will be -1 as well so failures will be 2
138138
assert.strictEqual(failures.length, 2, failures);

lighthouse-core/test/gather/gatherers/service-worker-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const ServiceWorkerGather = require('../../../gather/gatherers/service-worker');
1111
const assert = require('assert');
1212
let serviceWorkerGatherer;
1313

14-
describe('Service Worker gatherer', () => {
14+
describe('service worker gatherer', () => {
1515
// Reset the Gatherer before each test.
1616
beforeEach(() => {
1717
serviceWorkerGatherer = new ServiceWorkerGather();

0 commit comments

Comments
 (0)