Skip to content

Commit

Permalink
Fix a bunch of typos in tests dir (github#17132)
Browse files Browse the repository at this point in the history
Co-authored-by: Chiedo John <2156688+chiedo@users.noreply.github.com>
  • Loading branch information
heiskr and chiedo authored Jan 5, 2021
1 parent 3fa5d48 commit 4ffc2a5
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ GitHub.
Test are written using [jest](https://ghub.io/jest), a framework maintained
by Facebook and used by many teams at GitHub. Jest is convenient in that it
provides everything: a test runner, an assertion library, code coverage analysis,
custom reporters for diferent types of test output, etc.
custom reporters for different types of test output, etc.

### Running all the tests

Expand Down
8 changes: 4 additions & 4 deletions tests/content/algolia-search.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
const { dates, supported } = require('../../lib/enterprise-server-releases')
const languageCodes = Object.keys(require('../../lib/languages'))
const AlogliaIndex = require('../../lib/algolia/search-index')
const AlgoliaIndex = require('../../lib/algolia/search-index')
const remoteIndexNames = require('../../lib/algolia/cached-index-names.json')

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

// workaround for GHES release branches not in production yet
if (!remoteIndexNames.includes(indexName)) {
Expand All @@ -28,7 +28,7 @@ describe('aloglia', () => {
test('has remote indexNames in every language for dotcom', async () => {
expect(languageCodes.length).toBeGreaterThan(0)
languageCodes.forEach(languageCode => {
const indexName = `${AlogliaIndex.namePrefix}-dotcom-${languageCode}`
const indexName = `${AlgoliaIndex.namePrefix}-dotcom-${languageCode}`
expect(remoteIndexNames.includes(indexName)).toBe(true)
})
})
Expand Down
2 changes: 1 addition & 1 deletion tests/content/crowdin-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('crowdin.yml config file', () => {
done()
})

test('has expected file stucture', async () => {
test('has expected file structure', async () => {
expect(config.files.length).toBe(3)
expect(config.files[0].source).toBe('/content/**/*.md')
expect(config.files[0].ignore).toContain('/content/README.md')
Expand Down
6 changes: 3 additions & 3 deletions tests/content/site-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ describe('siteData module (English)', () => {
test('warn if any YAML reusables are found', async () => {
const reusables = require('walk-sync')(path.join(__dirname, '../../data/reusables'))
expect(reusables.length).toBeGreaterThan(100)
const yamlResuables = reusables.filter(filename => filename.endsWith('.yml') || filename.endsWith('.yaml'))
const message = `reusables are now written as individual Markdown files. Please migrate the following YAML files to Markdown:\n${yamlResuables.join('\n')}`
expect(yamlResuables.length, message).toBe(0)
const yamlReusables = reusables.filter(filename => filename.endsWith('.yml') || filename.endsWith('.yaml'))
const message = `reusables are now written as individual Markdown files. Please migrate the following YAML files to Markdown:\n${yamlReusables.join('\n')}`
expect(yamlReusables.length, message).toBe(0)
})

test('all non-English data has matching English data', async () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/content/webhooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ describe('webhook payloads', () => {
expect(ghesPayloads[dotcomOnlyPayload]).toBeUndefined()
expect(ghaePayloads[dotcomOnlyPayload]).toBeUndefined()

// fallback handling is in middleware/contexturalizers/webhooks.js
// fallback handling is in middleware/contextualizers/webhooks.js
const ghesPayloadsWithFallbacks = await getJSON(`/en/enterprise-server@${latest}/developers/webhooks-and-events?json=webhookPayloadsForCurrentVersion`)
const ghaePayloadsWithFallbacks = await getJSON('/en/github-ae@latest/developers/webhooks-and-events?json=webhookPayloadsForCurrentVersion')
expect(ghesPayloadsWithFallbacks[dotcomOnlyPayload]).toBeDefined()
Expand Down
2 changes: 1 addition & 1 deletion tests/helpers/links-checker.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ async function buildInitialContext () {

async function buildPathContext (initialContext, page, permalink) {
// Create a new object with path-specific properties.
// Note this is cherry-picking properties currently only needed by the middlware below;
// Note this is cherry-picking properties currently only needed by the middleware below;
// See middleware/context.js for the rest of the properties we are NOT refreshing per page.
// If we find this causes problems for link checking, we can call `contextualize` on
// every page. For now, this cherry-picking approach is intended to improve performance so
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ describe('Page class', () => {
basePath: path.join(__dirname, '../fixtures'),
languageCode: 'en'
})
// set version to the latest enteprise version
// set version to the latest enterprise version
const context = {
currentVersion: `enterprise-server@${enterpriseServerReleases.latest}`,
currentLanguage: 'en',
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/product-names.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const productNames = require('../../lib/product-names')

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

0 comments on commit 4ffc2a5

Please sign in to comment.