Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianaixba committed Jul 6, 2023
1 parent ed73656 commit 65cfddb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion core/audits/redirects.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ class Redirects extends Audit {
metricSavings: {
LCP: totalWastedMs,
FCP: totalWastedMs,
}
},
};
}
}
Expand Down
15 changes: 7 additions & 8 deletions core/test/audits/redirects-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ describe('Performance: Redirects audit', () => {
expect(output.details.items).toHaveLength(3);
expect(Math.round(output.score * 100) / 100).toMatchInlineSnapshot(`0.29`);
expect(output.numericValue).toMatchInlineSnapshot(`2000`);
expect(output.metricSavings).toEqual({LCP:2000, FCP:2000 });
expect(output.metricSavings).toEqual({LCP: 2000, FCP: 2000});
});

it('uses lantern timings when throttlingMethod is simulate', async () => {
Expand Down Expand Up @@ -193,7 +193,7 @@ describe('Performance: Redirects audit', () => {
]
`);
expect(output.numericValue).toMatchInlineSnapshot(`1890`);
expect(output.metricSavings).toEqual({LCP:1890, FCP:1890 });
expect(output.metricSavings).toEqual({LCP: 1890, FCP: 1890});
});

it('fails when 3 redirects detected', () => {
Expand All @@ -203,7 +203,7 @@ describe('Performance: Redirects audit', () => {
expect(output.details.items).toHaveLength(4);
expect(Math.round(output.score * 100) / 100).toMatchInlineSnapshot(`0.2`);
expect(output.numericValue).toMatchInlineSnapshot(`3000`);
expect(output.metricSavings).toEqual({LCP:3000, FCP:3000 });
expect(output.metricSavings).toEqual({LCP: 3000, FCP: 3000});
});
});

Expand All @@ -214,7 +214,7 @@ describe('Performance: Redirects audit', () => {
expect(output.details.items).toHaveLength(3);
expect(Math.round(output.score * 100) / 100).toMatchInlineSnapshot(`0.29`);
expect(output.numericValue).toMatchInlineSnapshot(`2000`);
expect(output.metricSavings).toEqual({LCP:2000, FCP:2000 });
expect(output.metricSavings).toEqual({LCP: 2000, FCP: 2000});
});
});

Expand All @@ -227,8 +227,7 @@ describe('Performance: Redirects audit', () => {
expect(output.details.items).toHaveLength(2);
expect(output.score).toEqual(1);
expect(output.numericValue).toMatchInlineSnapshot(`1000`);
expect(output.metricSavings).toEqual({LCP:1000, FCP:1000 });

expect(output.metricSavings).toEqual({LCP: 1000, FCP: 1000});
});
});

Expand All @@ -239,7 +238,7 @@ describe('Performance: Redirects audit', () => {
assert.equal(output.score, 1);
assert.equal(output.details.items.length, 0);
assert.equal(output.numericValue, 0);
assert.deepStrictEqual(output.metricSavings, {LCP: 0, FCP:0});
assert.deepStrictEqual(output.metricSavings, {LCP: 0, FCP: 0});
});
});

Expand Down Expand Up @@ -272,7 +271,7 @@ describe('Performance: Redirects audit', () => {
metricSavings: {
LCP: 3000,
FCP: 3000,
}
},
});
});

Expand Down

0 comments on commit 65cfddb

Please sign in to comment.