1
0
mirror of synced 2025-12-19 18:10:59 -05:00
Files
docs/tests/rendering-fixtures/head.js
2023-04-27 12:03:56 +00:00

14 lines
610 B
JavaScript

import { getDOM } from '../helpers/e2etest.js'
describe('<head>', () => {
test('includes page intro in `description` meta tag', async () => {
const $ = await getDOM('/get-started/markdown/intro')
// The intro has Markdown syntax which becomes HTML encoded in the lead element.
const lead = $('[data-testid="lead"] p')
expect(lead.html()).toMatch('<code>syntax</code>')
// As a meta description its content is stripped of all HTML
const description = $('head meta[name="description"]')
expect(description.attr('content')).toBe('This intro has Markdown syntax for GitHub')
})
})