1
0
mirror of synced 2026-01-02 21:04:32 -05:00

Merge pull request #17424 from github/repo-sync

repo sync
This commit is contained in:
Octomerger Bot
2022-04-27 10:55:48 -07:00
committed by GitHub
2 changed files with 6 additions and 6 deletions

View File

@@ -9,12 +9,12 @@ type Props = {
export function RestOperationHeading({ slug, title, descriptionHTML }: Props) {
return (
<>
<h3 id={slug}>
<h2 id={slug}>
<a href={`#${slug}`}>
<LinkIcon size={16} className="m-1" />
</a>
{title}
</h3>
</h2>
<div dangerouslySetInnerHTML={{ __html: descriptionHTML }} />
</>
)

View File

@@ -9,17 +9,17 @@ import { getDiffOpenAPIContentRest } from '../../script/rest/test-open-api-schem
describe('REST references docs', () => {
jest.setTimeout(3 * 60 * 1000)
// Checks that every version of the /rest/references/checks
// Checks that every version of the /rest/checks
// page has every operation defined in the openapi schema.
test('loads schema data for all versions', async () => {
for (const version in allVersions) {
const checksRestOperations = await getRest(version, 'checks', 'runs')
const $ = await getDOM(`/en/${version}/rest/checks/runs`)
const domH3Ids = $('h3')
.map((i, h3) => $(h3).attr('id'))
const domH2Ids = $('h2')
.map((i, h2) => $(h2).attr('id'))
.get()
const schemaSlugs = checksRestOperations.map((operation) => slugger.slug(operation.title))
expect(schemaSlugs.every((slug) => domH3Ids.includes(slug))).toBe(true)
expect(schemaSlugs.every((slug) => domH2Ids.includes(slug))).toBe(true)
}
})