We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 7b67e8f + 6ca732f commit 8e62ff5Copy full SHA for 8e62ff5
tests/rendering-fixtures/head.js
@@ -0,0 +1,13 @@
1
+import { getDOM } from '../helpers/e2etest.js'
2
+
3
+describe('<head>', () => {
4
+ test('includes page intro in `description` meta tag', async () => {
5
+ const $ = await getDOM('/get-started/markdown/intro')
6
+ // The intro has Markdown syntax which becomes HTML encoded in the lead element.
7
+ const lead = $('[data-testid="lead"] p')
8
+ expect(lead.html()).toMatch('<code>syntax</code>')
9
+ // As a meta description its content is stripped of all HTML
10
+ const description = $('head meta[name="description"]')
11
+ expect(description.attr('content')).toBe('This intro has Markdown syntax for GitHub')
12
+ })
13
+})
tests/rendering/head.js
0 commit comments