lint
This commit is contained in:
@@ -118,7 +118,7 @@ describe('Page class', () => {
|
||||
await page.render(context)
|
||||
const $ = cheerio.load(page.intro)
|
||||
expect($('a[href="/articles/about-pull-requests"]').length).toBe(0)
|
||||
expect($(`a[href="/en/articles/about-pull-requests"]`).length).toBeGreaterThan(0)
|
||||
expect($('a[href="/en/articles/about-pull-requests"]').length).toBeGreaterThan(0)
|
||||
})
|
||||
|
||||
test('does not rewrite links that include deprecated enterprise release numbers', async () => {
|
||||
@@ -235,7 +235,7 @@ describe('Page class', () => {
|
||||
|
||||
test('sets versioned values', async () => {
|
||||
const page = await Page.init(opts)
|
||||
expect(page.permalinks.find(permalink => permalink.pageVersion === nonEnterpriseDefaultVersion).href).toBe(`/en/github/collaborating-with-issues-and-pull-requests/about-branches`)
|
||||
expect(page.permalinks.find(permalink => permalink.pageVersion === nonEnterpriseDefaultVersion).href).toBe('/en/github/collaborating-with-issues-and-pull-requests/about-branches')
|
||||
expect(page.permalinks.find(permalink => permalink.pageVersion === `enterprise-server@${enterpriseServerReleases.oldestSupported}`).href).toBe(`/en/enterprise-server@${enterpriseServerReleases.oldestSupported}/github/collaborating-with-issues-and-pull-requests/about-branches`)
|
||||
})
|
||||
|
||||
@@ -245,7 +245,7 @@ describe('Page class', () => {
|
||||
basePath: path.join(__dirname, '../../content'),
|
||||
languageCode: 'en'
|
||||
})
|
||||
expect(page.permalinks.find(permalink => permalink.pageVersion === 'homepage').href).toBe(`/en`)
|
||||
expect(page.permalinks.find(permalink => permalink.pageVersion === 'homepage').href).toBe('/en')
|
||||
expect(page.permalinks.find(permalink => permalink.pageVersion === `enterprise-server@${enterpriseServerReleases.oldestSupported}`).href).toBe(`/en/enterprise-server@${enterpriseServerReleases.oldestSupported}`)
|
||||
})
|
||||
|
||||
@@ -255,7 +255,7 @@ describe('Page class', () => {
|
||||
basePath: path.join(__dirname, '../../content'),
|
||||
languageCode: 'en'
|
||||
})
|
||||
expect(page.permalinks.find(permalink => permalink.pageVersion === nonEnterpriseDefaultVersion).href).toBe(`/en/github/getting-started-with-github/signing-up-for-a-new-github-account`)
|
||||
expect(page.permalinks.find(permalink => permalink.pageVersion === nonEnterpriseDefaultVersion).href).toBe('/en/github/getting-started-with-github/signing-up-for-a-new-github-account')
|
||||
expect(page.permalinks.length).toBe(1)
|
||||
})
|
||||
|
||||
@@ -277,7 +277,7 @@ describe('Page class', () => {
|
||||
basePath: path.join(__dirname, '../fixtures'),
|
||||
languageCode: 'en'
|
||||
})
|
||||
expect(page.permalinks.find(permalink => permalink.pageVersion === nonEnterpriseDefaultVersion).href).toBe(`/en/products/actions/some-category/some-article`)
|
||||
expect(page.permalinks.find(permalink => permalink.pageVersion === nonEnterpriseDefaultVersion).href).toBe('/en/products/actions/some-category/some-article')
|
||||
expect(page.permalinks.length).toBe(1)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user