Skip to content

Commit

Permalink
addressing brendan's review for ALL the brownie points.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish committed Aug 6, 2016
1 parent 38ba8a2 commit 685bda0
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 22 deletions.
5 changes: 1 addition & 4 deletions lighthouse-core/audits/manifest-background-color.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ class ManifestBackgroundColor extends Audit {
*/
static getBackgroundColorValue(manifest) {
return manifest !== undefined &&
manifest.background_color !== undefined &&
manifest.background_color.value;
}

Expand All @@ -53,9 +52,7 @@ class ManifestBackgroundColor extends Audit {
return ManifestBackgroundColor.generateAuditResult({
rawValue: !!bgColor,
extendedInfo: {
value: {
color: bgColor
},
value: bgColor,
formatter: Formatter.SUPPORTED_FORMATS.NULL
}
});
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/test/audits/background-color.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ describe('Manifest: background color audit', () => {
};
const output = Audit.audit(artifacts);
assert.equal(output.rawValue, true);
assert.equal(output.extendedInfo.value.color, '#FAFAFA');
assert.equal(output.extendedInfo.value, '#FAFAFA');
});

it('succeeds when a complete manifest contains a background_color', () => {
Expand Down
9 changes: 0 additions & 9 deletions lighthouse-core/test/audits/cache-start-url.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,6 @@ describe('Cache: start_url audit', () => {

// Need to disable camelcase check for dealing with start_url.
/* eslint-disable camelcase */
it('fails when a manifest artifact contains no start_url', () => {
const artifacts = {
Manifest: { }
};
const output = Audit.audit(artifacts);
assert.equal(output.rawValue, false);
assert.equal(output.debugString, 'start_url not present in Manifest');
});

it('fails when a manifest contains no start_url', () => {
const artifacts = {
Manifest: manifestParser('{}')
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/test/audits/display.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ describe('Mobile-friendly: display audit', () => {

it('handles the case where there is no manifest display property', () => {
const artifacts = {
Manifest: manifestParser({})
Manifest: manifestParser('{}')
};
const output = Audit.audit(artifacts);

Expand Down
6 changes: 0 additions & 6 deletions lighthouse-core/test/audits/exists.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@ describe('Manifest: exists audit', () => {
}}).rawValue, false);
});

it('succeeds when a manifest artifact is present', () => {
return assert.equal(Audit.audit({Manifest: {
value: {}
}}).rawValue, true);
});

it('succeeds with a valid minimal manifest', () => {
const artifacts = {
Manifest: manifestParser('{}')
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/test/audits/start-url.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe('Manifest: start_url audit', () => {
assert.equal(output.debugString, undefined);
});

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

0 comments on commit 685bda0

Please sign in to comment.