зеркало из https://github.com/github/docs.git
A few tweaks to make local tests run (#34241)
This commit is contained in:
Родитель
3c7b72ba66
Коммит
7bf7aff237
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
|
||||
rm -rf translations
|
||||
mkdir translations
|
||||
|
||||
for lang in "zh-cn" "es-es" "pt-br" "ru-ru" "ja-jp" "fr-fr" "de-de" "ko-kr"
|
||||
do
|
||||
(cd translations && git clone --depth 1 "https://github.com/github/docs-internal.$lang.git" $lang)
|
||||
done
|
||||
|
||||
find . -name '.DS_Store' -type f -delete
|
|
@ -5,7 +5,7 @@ import path from 'path'
|
|||
describe('check for orphan tests', () => {
|
||||
test('all tests are in sub-directories', async () => {
|
||||
// A known list of exceptions that can live outside of directories
|
||||
const EXCEPTIONS = ['README.md', 'package.json', 'utils.js']
|
||||
const EXCEPTIONS = ['README.md', 'package.json', 'utils.js', '.DS_Store']
|
||||
const pathToTests = path.join(process.cwd(), 'tests')
|
||||
|
||||
// Get a list of files/directories in `/tests`
|
||||
|
|
|
@ -84,6 +84,7 @@ const ALLOW_DOCS_PATHS = [
|
|||
'ownership.yaml',
|
||||
'script/README.md',
|
||||
'script/toggle-ghae-feature-flags.js',
|
||||
'script/i18n/clone-translations.sh',
|
||||
]
|
||||
|
||||
// This regexp will capture the last segment of a GitHub repo name.
|
||||
|
|
|
@ -2,10 +2,13 @@ import { languageKeys } from '../../lib/languages.js'
|
|||
import { blockIndex } from '../../middleware/block-robots.js'
|
||||
import { get, getDOMCached as getDOM } from '../helpers/e2etest.js'
|
||||
import Page from '../../lib/page.js'
|
||||
import { jest } from '@jest/globals'
|
||||
|
||||
const langs = languageKeys.filter((lang) => lang !== 'en')
|
||||
|
||||
describe('frame', () => {
|
||||
jest.setTimeout(60 * 1000)
|
||||
|
||||
test.each(langs)('allows crawling of %s pages', async (lang) => {
|
||||
expect(blockIndex(`/${lang}/articles/verifying-your-email-address`)).toBe(false)
|
||||
})
|
||||
|
|
Загрузка…
Ссылка в новой задаче