mirror of
https://github.com/primer/css.git
synced 2024-12-24 14:42:26 +03:00
f27faef3eb
* Bump globby from 11.0.4 to 12.0.0 Bumps [globby](https://github.com/sindresorhus/globby) from 11.0.4 to 12.0.0. - [Release notes](https://github.com/sindresorhus/globby/releases) - [Commits](https://github.com/sindresorhus/globby/compare/v11.0.4...v12.0.0) --- updated-dependencies: - dependency-name: globby dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * Import globby * Converting tests * Ignore docs test Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jon Rohan <yes@jonrohan.codes>
34 lines
810 B
JavaScript
34 lines
810 B
JavaScript
import {getNavigationLinks, getContentFrontmatter} from './utils/docs'
|
|
|
|
let navLinks, contentFM
|
|
|
|
beforeAll(async () => {
|
|
contentFM = await getContentFrontmatter()
|
|
navLinks = getNavigationLinks()
|
|
})
|
|
|
|
describe('frontmatter', () => {
|
|
it('page title matches link title', () => {
|
|
for (const link of navLinks) {
|
|
const content = contentFM[link['url']]
|
|
expect(content).not.toBeNull()
|
|
expect(content['title']).toBe(link['title'])
|
|
}
|
|
})
|
|
|
|
it('contains path attribute', () => {
|
|
for (const v of Object.values(contentFM)) {
|
|
expect(v['path']).not.toBeNull()
|
|
}
|
|
})
|
|
})
|
|
|
|
describe('navigation', () => {
|
|
it('has a file for each nav item', () => {
|
|
for (const link of navLinks) {
|
|
const content = contentFM[link['url']]
|
|
expect(content).not.toBeNull()
|
|
}
|
|
})
|
|
})
|