Skip to content

Commit 685bda0

Browse files
committed
addressing brendan's review for ALL the brownie points.
1 parent 38ba8a2 commit 685bda0

File tree

6 files changed

+4
-22
lines changed

6 files changed

+4
-22
lines changed

lighthouse-core/audits/manifest-background-color.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ class ManifestBackgroundColor extends Audit {
3939
*/
4040
static getBackgroundColorValue(manifest) {
4141
return manifest !== undefined &&
42-
manifest.background_color !== undefined &&
4342
manifest.background_color.value;
4443
}
4544

@@ -53,9 +52,7 @@ class ManifestBackgroundColor extends Audit {
5352
return ManifestBackgroundColor.generateAuditResult({
5453
rawValue: !!bgColor,
5554
extendedInfo: {
56-
value: {
57-
color: bgColor
58-
},
55+
value: bgColor,
5956
formatter: Formatter.SUPPORTED_FORMATS.NULL
6057
}
6158
});

lighthouse-core/test/audits/background-color.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ describe('Manifest: background color audit', () => {
6767
};
6868
const output = Audit.audit(artifacts);
6969
assert.equal(output.rawValue, true);
70-
assert.equal(output.extendedInfo.value.color, '#FAFAFA');
70+
assert.equal(output.extendedInfo.value, '#FAFAFA');
7171
});
7272

7373
it('succeeds when a complete manifest contains a background_color', () => {

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

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,6 @@ describe('Cache: start_url audit', () => {
4545

4646
// Need to disable camelcase check for dealing with start_url.
4747
/* eslint-disable camelcase */
48-
it('fails when a manifest artifact contains no start_url', () => {
49-
const artifacts = {
50-
Manifest: { }
51-
};
52-
const output = Audit.audit(artifacts);
53-
assert.equal(output.rawValue, false);
54-
assert.equal(output.debugString, 'start_url not present in Manifest');
55-
});
56-
5748
it('fails when a manifest contains no start_url', () => {
5849
const artifacts = {
5950
Manifest: manifestParser('{}')

lighthouse-core/test/audits/display.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ describe('Mobile-friendly: display audit', () => {
3838

3939
it('handles the case where there is no manifest display property', () => {
4040
const artifacts = {
41-
Manifest: manifestParser({})
41+
Manifest: manifestParser('{}')
4242
};
4343
const output = Audit.audit(artifacts);
4444

lighthouse-core/test/audits/exists.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,6 @@ describe('Manifest: exists audit', () => {
2929
}}).rawValue, false);
3030
});
3131

32-
it('succeeds when a manifest artifact is present', () => {
33-
return assert.equal(Audit.audit({Manifest: {
34-
value: {}
35-
}}).rawValue, true);
36-
});
37-
3832
it('succeeds with a valid minimal manifest', () => {
3933
const artifacts = {
4034
Manifest: manifestParser('{}')

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ describe('Manifest: start_url audit', () => {
3737
assert.equal(output.debugString, undefined);
3838
});
3939

40-
// Need to disable camelcase check for dealing with short_name.
40+
// Need to disable camelcase check for dealing with start_url.
4141
/* eslint-disable camelcase */
4242
it('fails when a manifest contains no start_url', () => {
4343
const artifacts = {

0 commit comments

Comments
 (0)