Skip to content

Commit d64a444

Browse files
committed
Add unit test for page.defaultPlatform
1 parent de490f6 commit d64a444

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

tests/unit/page.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,18 @@ describe('Page class', () => {
362362
expect(page.versions['enterprise-server']).toBe('*')
363363
})
364364
})
365+
366+
describe('platform specific content', () => {
367+
test('page.defaultPlatform frontmatter', async () => {
368+
const page = new Page({
369+
relativePath: 'actions/hosting-your-own-runners/configuring-the-self-hosted-runner-application-as-a-service.md',
370+
basePath: path.join(__dirname, '../../content'),
371+
languageCode: 'en'
372+
})
373+
expect(page.defaultPlatform).toBeDefined()
374+
expect(page.defaultPlatform).toBe('linux')
375+
})
376+
})
365377
})
366378

367379
describe('catches errors thrown in Page class', () => {

0 commit comments

Comments
 (0)