[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests(font-size): assert on source #9413

Merged
merged 4 commits into from
Jul 23, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
patrick feedback
  • Loading branch information
connorjclark committed Jul 19, 2019
commit 99d2ab411fc19609940b9645a0573b3712a8f106
24 changes: 14 additions & 10 deletions lighthouse-core/test/audits/seo/font-size-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,11 +264,13 @@ describe('SEO: Font size audit', () => {
attributes: ['class', 'my-p'],
});

expect(auditResult.details.items[0].source).toBe('http://www.example.com');
expect(auditResult.details.items[0].selector).toMatchObject({
type: 'node',
selector: '#my-parent',
snippet: '<p class="my-p">',
expect(auditResult.details.items[0]).toMatchObject({
source: URL.finalUrl,
selector: {
type: 'node',
selector: '#my-parent',
snippet: '<p class="my-p">',
},
});
});

Expand All @@ -281,11 +283,13 @@ describe('SEO: Font size audit', () => {
attributes: ['size', '10px'],
});

expect(auditResult.details.items[0].source).toBe('http://www.example.com');
expect(auditResult.details.items[0].selector).toMatchObject({
type: 'node',
selector: '#my-parent',
snippet: '<font size="10px">',
expect(auditResult.details.items[0]).toMatchObject({
source: URL.finalUrl,
selector: {
type: 'node',
selector: '#my-parent',
snippet: '<font size="10px">',
},
});
});
});
Expand Down