Skip to content

Commit 4ffc2a5

Browse files
heiskrchiedo
andauthored
Fix a bunch of typos in tests dir (#17132)
Co-authored-by: Chiedo John <2156688+chiedo@users.noreply.github.com>
1 parent 3fa5d48 commit 4ffc2a5

8 files changed

Lines changed: 13 additions & 13 deletions

File tree

tests/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ GitHub.
88
Test are written using [jest](https://ghub.io/jest), a framework maintained
99
by Facebook and used by many teams at GitHub. Jest is convenient in that it
1010
provides everything: a test runner, an assertion library, code coverage analysis,
11-
custom reporters for diferent types of test output, etc.
11+
custom reporters for different types of test output, etc.
1212

1313
### Running all the tests
1414

tests/content/algolia-search.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
const { dates, supported } = require('../../lib/enterprise-server-releases')
22
const languageCodes = Object.keys(require('../../lib/languages'))
3-
const AlogliaIndex = require('../../lib/algolia/search-index')
3+
const AlgoliaIndex = require('../../lib/algolia/search-index')
44
const remoteIndexNames = require('../../lib/algolia/cached-index-names.json')
55

6-
describe('aloglia', () => {
6+
describe('algolia', () => {
77
test('has remote indexNames in every language for every supported GHE version', () => {
88
expect(supported.length).toBeGreaterThan(1)
99
supported.forEach(version => {
1010
languageCodes.forEach(languageCode => {
11-
const indexName = `${AlogliaIndex.namePrefix}-${version}-${languageCode}`
11+
const indexName = `${AlgoliaIndex.namePrefix}-${version}-${languageCode}`
1212

1313
// workaround for GHES release branches not in production yet
1414
if (!remoteIndexNames.includes(indexName)) {
@@ -28,7 +28,7 @@ describe('aloglia', () => {
2828
test('has remote indexNames in every language for dotcom', async () => {
2929
expect(languageCodes.length).toBeGreaterThan(0)
3030
languageCodes.forEach(languageCode => {
31-
const indexName = `${AlogliaIndex.namePrefix}-dotcom-${languageCode}`
31+
const indexName = `${AlgoliaIndex.namePrefix}-dotcom-${languageCode}`
3232
expect(remoteIndexNames.includes(indexName)).toBe(true)
3333
})
3434
})

tests/content/crowdin-config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ describe('crowdin.yml config file', () => {
1212
done()
1313
})
1414

15-
test('has expected file stucture', async () => {
15+
test('has expected file structure', async () => {
1616
expect(config.files.length).toBe(3)
1717
expect(config.files[0].source).toBe('/content/**/*.md')
1818
expect(config.files[0].ignore).toContain('/content/README.md')

tests/content/site-data.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ describe('siteData module (English)', () => {
8484
test('warn if any YAML reusables are found', async () => {
8585
const reusables = require('walk-sync')(path.join(__dirname, '../../data/reusables'))
8686
expect(reusables.length).toBeGreaterThan(100)
87-
const yamlResuables = reusables.filter(filename => filename.endsWith('.yml') || filename.endsWith('.yaml'))
88-
const message = `reusables are now written as individual Markdown files. Please migrate the following YAML files to Markdown:\n${yamlResuables.join('\n')}`
89-
expect(yamlResuables.length, message).toBe(0)
87+
const yamlReusables = reusables.filter(filename => filename.endsWith('.yml') || filename.endsWith('.yaml'))
88+
const message = `reusables are now written as individual Markdown files. Please migrate the following YAML files to Markdown:\n${yamlReusables.join('\n')}`
89+
expect(yamlReusables.length, message).toBe(0)
9090
})
9191

9292
test('all non-English data has matching English data', async () => {

tests/content/webhooks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ describe('webhook payloads', () => {
5656
expect(ghesPayloads[dotcomOnlyPayload]).toBeUndefined()
5757
expect(ghaePayloads[dotcomOnlyPayload]).toBeUndefined()
5858

59-
// fallback handling is in middleware/contexturalizers/webhooks.js
59+
// fallback handling is in middleware/contextualizers/webhooks.js
6060
const ghesPayloadsWithFallbacks = await getJSON(`/en/enterprise-server@${latest}/developers/webhooks-and-events?json=webhookPayloadsForCurrentVersion`)
6161
const ghaePayloadsWithFallbacks = await getJSON('/en/github-ae@latest/developers/webhooks-and-events?json=webhookPayloadsForCurrentVersion')
6262
expect(ghesPayloadsWithFallbacks[dotcomOnlyPayload]).toBeDefined()

tests/helpers/links-checker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ async function buildInitialContext () {
229229

230230
async function buildPathContext (initialContext, page, permalink) {
231231
// Create a new object with path-specific properties.
232-
// Note this is cherry-picking properties currently only needed by the middlware below;
232+
// Note this is cherry-picking properties currently only needed by the middleware below;
233233
// See middleware/context.js for the rest of the properties we are NOT refreshing per page.
234234
// If we find this causes problems for link checking, we can call `contextualize` on
235235
// every page. For now, this cherry-picking approach is intended to improve performance so

tests/unit/page.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ describe('Page class', () => {
159159
basePath: path.join(__dirname, '../fixtures'),
160160
languageCode: 'en'
161161
})
162-
// set version to the latest enteprise version
162+
// set version to the latest enterprise version
163163
const context = {
164164
currentVersion: `enterprise-server@${enterpriseServerReleases.latest}`,
165165
currentLanguage: 'en',

tests/unit/product-names.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const productNames = require('../../lib/product-names')
22

33
describe('productNames module', () => {
4-
test('is an object with product codes as keys and human-frienly names as values', () => {
4+
test('is an object with product codes as keys and human-friendly names as values', () => {
55
expect(productNames.dotcom).toBe('GitHub.com')
66
expect(productNames['2.15']).toBe('Enterprise Server 2.15')
77
expect(productNames['2.10']).toBe('Enterprise Server 2.10')

0 commit comments

Comments
 (0)