1
0
mirror of synced 2025-12-19 18:10:59 -05:00

Migrate tests/ files to src/ (#45840)

This commit is contained in:
Kevin Heis
2023-11-13 11:40:33 -08:00
committed by GitHub
parent f86ebbca67
commit c0ddefdfcc
269 changed files with 179 additions and 185 deletions

View File

@@ -38,25 +38,23 @@ jobs:
# Note that *if you add* to this, remember to also add that # Note that *if you add* to this, remember to also add that
# to the **required checks** in the branch protection rules. # to the **required checks** in the branch protection rules.
name: name:
# tests/ directory
- content
- rendering
- rendering-fixtures
- routing
- unit
# src/ directory # src/ directory
- archives - archives
- assets - assets
- audit-logs - audit-logs
- automated-pipelines - automated-pipelines
# - bookmarklets
- changelogs
# - codeql-cli # - codeql-cli
- color-schemes - color-schemes
- content-linter - content-linter
- content-render - content-render
- data-directory
# - dev-toc
- early-access - early-access
- events - events
# - frame - fixtures
- frame
- ghes-releases - ghes-releases
- github-apps - github-apps
- graphql - graphql
@@ -68,12 +66,14 @@ jobs:
# - open-source # - open-source
- pageinfo - pageinfo
# - pages # - pages
- products
- redirects - redirects
- release-notes - release-notes
- rest - rest
- search - search
- secret-scanning - secret-scanning
- shielding - shielding
# - tests
# - tools # - tools
- versions - versions
- webhooks - webhooks
@@ -103,23 +103,23 @@ jobs:
token: ${{ secrets.DOCS_BOT_PAT_READPUBLICKEY }} token: ${{ secrets.DOCS_BOT_PAT_READPUBLICKEY }}
- name: Check the test fixture data (if applicable) - name: Check the test fixture data (if applicable)
if: ${{ matrix.name == 'rendering-fixtures' }} if: ${{ matrix.name == 'fixtures' }}
run: ./src/tests/scripts/copy-fixture-data.js --check run: ./src/tests/scripts/copy-fixture-data.js --check
# This keeps our fixture content/data in check # This keeps our fixture content/data in check
- name: Check the test fixture content (if applicable) - name: Check the test fixture content (if applicable)
if: ${{ matrix.name == 'rendering-fixtures' }} if: ${{ matrix.name == 'fixtures' }}
env: env:
ROOT: tests/fixtures ROOT: src/fixtures/fixtures
run: | run: |
# If either of these fail, it means our fixture content's internal # If either of these fail, it means our fixture content's internal
# links can and should be updated. # links can and should be updated.
./src/links/scripts/update-internal-links.js --dry-run --check --strict \ ./src/links/scripts/update-internal-links.js --dry-run --check --strict \
tests/fixtures/content \ src/fixtures/fixtures/content \
--exclude tests/fixtures/content/get-started/foo/typo-autotitling.md \ --exclude src/fixtures/fixtures/content/get-started/foo/typo-autotitling.md \
--exclude tests/fixtures/content/get-started/foo/anchor-autotitling.md --exclude src/fixtures/fixtures/content/get-started/foo/anchor-autotitling.md
./src/links/scripts/update-internal-links.js --dry-run --check --strict \ ./src/links/scripts/update-internal-links.js --dry-run --check --strict \
tests/fixtures/data src/fixtures/fixtures/data
- name: Clone all translations - name: Clone all translations
if: ${{ matrix.name == 'languages' }} if: ${{ matrix.name == 'languages' }}
@@ -169,7 +169,7 @@ jobs:
- uses: ./.github/actions/warmup-remotejson-cache - uses: ./.github/actions/warmup-remotejson-cache
# Only the 'routing' tests include end-to-end tests about # Only the 'routing' tests include end-to-end tests about
# archived enterprise server URLs. # archived enterprise server URLs.
if: ${{ matrix.name == 'routing' }} if: ${{ matrix.name == 'redirects' }}
- name: Index fixtures into the local Elasticsearch - name: Index fixtures into the local Elasticsearch
# For the sake of saving time, only run this step if the group # For the sake of saving time, only run this step if the group
@@ -180,17 +180,11 @@ jobs:
- name: Run tests - name: Run tests
env: env:
DIFF_FILE: get_diff_files.txt DIFF_FILE: get_diff_files.txt
CHANGELOG_CACHE_FILE_PATH: tests/fixtures/changelog-feed.json CHANGELOG_CACHE_FILE_PATH: src/fixtures/fixtures/changelog-feed.json
# By default, when `process.env.NODE_ENV === 'test'` it forces the # By default, when `process.env.NODE_ENV === 'test'` it forces the
# tests run only in English. The exception is the # tests run only in English. The exception is the
# `languages` suite which needs all languages to be set up. # `languages` suite which needs all languages to be set up.
ENABLED_LANGUAGES: ${{ matrix.name == 'languages' && 'all' || '' }} ENABLED_LANGUAGES: ${{ matrix.name == 'languages' && 'all' || '' }}
ROOT: ${{ (matrix.name == 'rendering-fixtures' || matrix.name == 'pageinfo' || matrix.name == 'landings' ) && 'tests/fixtures' || '' }} ROOT: ${{ (matrix.name == 'fixtures' || matrix.name == 'pageinfo' || matrix.name == 'landings' ) && 'src/fixtures/fixtures' || '' }}
TRANSLATIONS_FIXTURE_ROOT: ${{ (matrix.name == 'rendering-fixtures' || matrix.name == 'pageinfo') && 'tests/fixtures/translations' || '' }} TRANSLATIONS_FIXTURE_ROOT: ${{ (matrix.name == 'fixtures' || matrix.name == 'pageinfo') && 'src/fixtures/fixtures/translations' || '' }}
run: | run: npm test -- src/${{ matrix.name }}/tests/
if [ -d "tests/${{ matrix.name }}/" ]
then
npm test -- tests/${{ matrix.name }}/
else
npm test -- src/${{ matrix.name }}/tests/
fi

View File

@@ -212,7 +212,7 @@ jobs:
- name: Run tests - name: Run tests
env: env:
DIFF_FILE: get_diff_files.txt DIFF_FILE: get_diff_files.txt
CHANGELOG_CACHE_FILE_PATH: tests/fixtures/changelog-feed.json CHANGELOG_CACHE_FILE_PATH: src/fixtures/fixtures/changelog-feed.json
run: npm test -- {% raw %}tests/${{ matrix.test-group }}/{% endraw %} run: npm test -- {% raw %}tests/${{ matrix.test-group }}/{% endraw %}
``` ```

View File

@@ -19,8 +19,8 @@
"build": "next build", "build": "next build",
"debug": "cross-env NODE_ENV=development ENABLED_LANGUAGES=en nodemon --inspect src/frame/server.js", "debug": "cross-env NODE_ENV=development ENABLED_LANGUAGES=en nodemon --inspect src/frame/server.js",
"dev": "cross-env npm start", "dev": "cross-env npm start",
"fixture-dev": "cross-env ROOT=tests/fixtures npm start", "fixture-dev": "cross-env ROOT=src/fixtures/fixtures npm start",
"fixture-test": "cross-env ROOT=tests/fixtures npm test -- tests/rendering-fixtures", "fixture-test": "cross-env ROOT=src/fixtures/fixtures npm test -- src/fixtures/tests",
"index-test-fixtures": "node src/search/scripts/index-elasticsearch.js -l en -l ja -V ghae -V dotcom --index-prefix tests -- src/search/tests/fixtures/search-indexes", "index-test-fixtures": "node src/search/scripts/index-elasticsearch.js -l en -l ja -V ghae -V dotcom --index-prefix tests -- src/search/tests/fixtures/search-indexes",
"lint": "eslint '**/*.{js,mjs,ts,tsx}'", "lint": "eslint '**/*.{js,mjs,ts,tsx}'",
"lint-content": "node src/content-linter/scripts/lint-content.js", "lint-content": "node src/content-linter/scripts/lint-content.js",
@@ -37,7 +37,7 @@
"prestart": "node src/workflows/cmp-files.js package-lock.json .installed.package-lock.json || npm install && cp package-lock.json .installed.package-lock.json", "prestart": "node src/workflows/cmp-files.js package-lock.json .installed.package-lock.json || npm install && cp package-lock.json .installed.package-lock.json",
"start": "cross-env NODE_ENV=development ENABLED_LANGUAGES=en nodemon src/frame/server.js", "start": "cross-env NODE_ENV=development ENABLED_LANGUAGES=en nodemon src/frame/server.js",
"start-all-languages": "cross-env NODE_ENV=development nodemon src/frame/server.js", "start-all-languages": "cross-env NODE_ENV=development nodemon src/frame/server.js",
"start-for-playwright": "cross-env ROOT=tests/fixtures TRANSLATIONS_FIXTURE_ROOT=tests/fixtures/translations ENABLED_LANGUAGES=en,ja NODE_ENV=test node src/frame/server.js", "start-for-playwright": "cross-env ROOT=src/fixtures/fixtures TRANSLATIONS_FIXTURE_ROOT=src/fixtures/fixtures/translations ENABLED_LANGUAGES=en,ja NODE_ENV=test node src/frame/server.js",
"sync-rest": "node src/rest/scripts/update-files.js", "sync-rest": "node src/rest/scripts/update-files.js",
"sync-search": "cross-env NODE_OPTIONS='--max_old_space_size=8192' start-server-and-test sync-search-server 4002 sync-search-indices", "sync-search": "cross-env NODE_OPTIONS='--max_old_space_size=8192' start-server-and-test sync-search-server 4002 sync-search-indices",
"sync-search-ghes-release": "cross-env GHES_RELEASE=1 start-server-and-test sync-search-server 4002 sync-search-indices", "sync-search-ghes-release": "cross-env GHES_RELEASE=1 start-server-and-test sync-search-server 4002 sync-search-indices",
@@ -200,8 +200,8 @@
"testPathIgnorePatterns": [ "testPathIgnorePatterns": [
"node_modules/", "node_modules/",
"vendor/", "vendor/",
"tests/fixtures/", "src/fixtures/fixtures/",
"tests/helpers/" "src/tests/helpers/"
] ]
}, },
"dependencies": { "dependencies": {

View File

@@ -10,7 +10,7 @@ import { defineConfig, devices } from '@playwright/test'
* See https://playwright.dev/docs/test-configuration. * See https://playwright.dev/docs/test-configuration.
*/ */
export default defineConfig({ export default defineConfig({
testDir: './tests', testDir: './src/fixtures/tests',
/* Maximum time one test can run for. */ /* Maximum time one test can run for. */
timeout: 30 * 1000, timeout: 30 * 1000,
expect: { expect: {

View File

@@ -1,7 +1,7 @@
import { describe, jest, test } from '@jest/globals' import { describe, jest, test } from '@jest/globals'
import enterpriseServerReleases from '#src/versions/lib/enterprise-server-releases.js' import enterpriseServerReleases from '#src/versions/lib/enterprise-server-releases.js'
import { get, getDOM } from '../../../tests/helpers/e2etest.js' import { get, getDOM } from '#src/tests/helpers/e2etest.js'
import { SURROGATE_ENUMS } from '#src/frame/middleware/set-fastly-surrogate-key.js' import { SURROGATE_ENUMS } from '#src/frame/middleware/set-fastly-surrogate-key.js'
jest.useFakeTimers({ legacyFakeTimers: true }) jest.useFakeTimers({ legacyFakeTimers: true })

View File

@@ -95,7 +95,7 @@ async function main(opts) {
} }
} }
const roots = ['tests', 'contributing', 'src', 'assets'] const roots = ['contributing', 'src', 'assets']
for (const root of roots) { for (const root of roots) {
sourceFiles.push( sourceFiles.push(

View File

@@ -3,7 +3,7 @@ import sharp from 'sharp'
import { fileTypeFromBuffer } from 'file-type' import { fileTypeFromBuffer } from 'file-type'
import { SURROGATE_ENUMS } from '#src/frame/middleware/set-fastly-surrogate-key.js' import { SURROGATE_ENUMS } from '#src/frame/middleware/set-fastly-surrogate-key.js'
import { get, head } from '../../../tests/helpers/e2etest.js' import { get, head } from '#src/tests/helpers/e2etest.js'
describe('dynamic assets', () => { describe('dynamic assets', () => {
jest.setTimeout(3 * 60 * 1000) jest.setTimeout(3 * 60 * 1000)

View File

@@ -1,7 +1,7 @@
import nock from 'nock' import nock from 'nock'
import { expect, jest } from '@jest/globals' import { expect, jest } from '@jest/globals'
import { checkCachingHeaders } from '../../../tests/helpers/caching-headers.js' import { checkCachingHeaders } from '#src/tests/helpers/caching-headers.js'
import { setDefaultFastlySurrogateKey } from '#src/frame/middleware/set-fastly-surrogate-key.js' import { setDefaultFastlySurrogateKey } from '#src/frame/middleware/set-fastly-surrogate-key.js'
import archivedEnterpriseVersionsAssets from '#src/archives/middleware/archived-enterprise-versions-assets.js' import archivedEnterpriseVersionsAssets from '#src/archives/middleware/archived-enterprise-versions-assets.js'

View File

@@ -3,8 +3,8 @@ import path from 'path'
import { jest, expect } from '@jest/globals' import { jest, expect } from '@jest/globals'
import { get } from '../../../tests/helpers/e2etest.js' import { get } from '#src/tests/helpers/e2etest.js'
import { checkCachingHeaders } from '../../../tests/helpers/caching-headers.js' import { checkCachingHeaders } from '#src/tests/helpers/caching-headers.js'
function getNextStaticAsset(directory) { function getNextStaticAsset(directory) {
const root = path.join('.next', 'static', directory) const root = path.join('.next', 'static', directory)

View File

@@ -1,6 +1,6 @@
import { expect } from '@jest/globals' import { expect } from '@jest/globals'
import { getDOM } from '../../../tests/helpers/e2etest.js' import { getDOM } from '#src/tests/helpers/e2etest.js'
import { allVersions } from '#src/versions/lib/all-versions.js' import { allVersions } from '#src/versions/lib/all-versions.js'
import { getAuditLogEvents } from '../lib/index.js' import { getAuditLogEvents } from '../lib/index.js'

View File

@@ -4,7 +4,7 @@ import cheerio from 'cheerio'
import { jest, test } from '@jest/globals' import { jest, test } from '@jest/globals'
import { loadPages } from '#src/frame/lib/page-data.js' import { loadPages } from '#src/frame/lib/page-data.js'
import { get } from '../../../tests/helpers/e2etest.js' import { get } from '#src/tests/helpers/e2etest.js'
// Get a list of the autogenerated pages // Get a list of the autogenerated pages
const pageList = await loadPages(undefined, ['en']) const pageList = await loadPages(undefined, ['en'])

View File

@@ -10,7 +10,7 @@ describe('getChangelogItems module', () => {
beforeAll(async () => { beforeAll(async () => {
const rssFeedContent = await fs.readFile( const rssFeedContent = await fs.readFile(
path.join(process.cwd(), 'tests/fixtures/rss-feed.xml'), path.join(process.cwd(), 'src/fixtures/fixtures/rss-feed.xml'),
'utf8', 'utf8',
) )

View File

@@ -1,6 +1,6 @@
import { loadPages, loadPageMap } from '#src/frame/lib/page-data.js' import { loadPages, loadPageMap } from '#src/frame/lib/page-data.js'
import loadRedirects from '#src/redirects/lib/precompile.js' import loadRedirects from '#src/redirects/lib/precompile.js'
import { checkURL } from '../../../tests/helpers/check-url.js' import { checkURL } from '#src/tests/helpers/check-url.js'
const pageList = await loadPages(undefined, ['en']) const pageList = await loadPages(undefined, ['en'])
const pages = await loadPageMap(pageList) const pages = await loadPageMap(pageList)

View File

@@ -5,7 +5,7 @@ import semver from 'semver'
import featureVersionsSchema from '../lib/feature-versions-schema.js' import featureVersionsSchema from '../lib/feature-versions-schema.js'
import { getDeepDataByLanguage } from '#src/data-directory/lib/get-data.js' import { getDeepDataByLanguage } from '#src/data-directory/lib/get-data.js'
import { formatAjvErrors } from '../../../tests/helpers/schemas.js' import { formatAjvErrors } from '#src/tests/helpers/schemas.js'
/* /*
NOTE: This test suite does NOT validate the `versions` frontmatter in content files. NOTE: This test suite does NOT validate the `versions` frontmatter in content files.

View File

@@ -4,7 +4,7 @@ import { runRule } from '../../lib/init-test.js'
import { frontmatterHiddenDocs } from '../../lib/linting-rules/frontmatter-hidden-docs.js' import { frontmatterHiddenDocs } from '../../lib/linting-rules/frontmatter-hidden-docs.js'
const ACTIONS_FIXTURE = 'src/content-linter/tests/fixtures/actions/hidden.md' const ACTIONS_FIXTURE = 'src/content-linter/tests/fixtures/actions/hidden.md'
const EARLY_ACCESS_FIXTURE = 'tests/fixtures/content/early-access/secrets/early-days.md' const EARLY_ACCESS_FIXTURE = 'src/fixtures/fixtures/content/early-access/secrets/early-days.md'
const EXPERIMENTAL_FIXTURE = 'src/content-linter/tests/fixtures/actions/experimental.md' const EXPERIMENTAL_FIXTURE = 'src/content-linter/tests/fixtures/actions/experimental.md'
const fmOptions = { markdownlintOptions: { frontMatter: null } } const fmOptions = { markdownlintOptions: { frontMatter: null } }

View File

@@ -10,7 +10,7 @@ describe(liquidDataReferencesDefined.names.join(' - '), () => {
const envVarValueBefore = process.env.ROOT const envVarValueBefore = process.env.ROOT
beforeAll(() => { beforeAll(() => {
process.env.ROOT = path.join('tests', 'fixtures') process.env.ROOT = path.join('src', 'fixtures', 'fixtures')
}) })
afterAll(() => { afterAll(() => {

View File

@@ -8,7 +8,7 @@ describe(liquidIfTags.names.join(' - '), () => {
const envVarValueBefore = process.env.ROOT const envVarValueBefore = process.env.ROOT
beforeAll(() => { beforeAll(() => {
process.env.ROOT = path.join('tests', 'fixtures') process.env.ROOT = path.join('src', 'fixtures', 'fixtures')
}) })
afterAll(() => { afterAll(() => {
@@ -39,7 +39,7 @@ describe(liquidIfVersionTags.names.join(' - '), () => {
const envVarValueBefore = process.env.ROOT const envVarValueBefore = process.env.ROOT
beforeAll(() => { beforeAll(() => {
process.env.ROOT = path.join('tests', 'fixtures') process.env.ROOT = path.join('src', 'fixtures', 'fixtures')
}) })
afterAll(() => { afterAll(() => {

View File

@@ -3,7 +3,7 @@ import { afterAll, beforeAll, expect, describe, it } from '@jest/globals'
import Page from '#src/frame/lib/page.js' import Page from '#src/frame/lib/page.js'
import languages from '#src/languages/lib/languages.js' import languages from '#src/languages/lib/languages.js'
import nonEnterpriseDefaultVersion from '#src/versions/lib/non-enterprise-default-version.js' import nonEnterpriseDefaultVersion from '#src/versions/lib/non-enterprise-default-version.js'
import { DataDirectory } from '../../../tests/helpers/data-directory.js' import { DataDirectory } from '#src/tests/helpers/data-directory.js'
describe('data tag', () => { describe('data tag', () => {
let dd let dd
@@ -30,7 +30,7 @@ describe('data tag', () => {
it('should render fine if data is found', async () => { it('should render fine if data is found', async () => {
const page = await Page.init({ const page = await Page.init({
relativePath: 'liquid-tags/good-data-variable.md', relativePath: 'liquid-tags/good-data-variable.md',
basePath: './tests/fixtures', basePath: './src/fixtures/fixtures',
languageCode: 'en', languageCode: 'en',
}) })
const context = { const context = {
@@ -47,7 +47,7 @@ describe('data tag', () => {
it('should throw if the data tag is used with something unrecognized', async () => { it('should throw if the data tag is used with something unrecognized', async () => {
const page = await Page.init({ const page = await Page.init({
relativePath: 'liquid-tags/bad-data-variable.md', relativePath: 'liquid-tags/bad-data-variable.md',
basePath: './tests/fixtures', basePath: './src/fixtures/fixtures',
languageCode: 'en', languageCode: 'en',
}) })
const context = { const context = {

View File

@@ -1,7 +1,7 @@
import { afterAll, jest, beforeAll, expect } from '@jest/globals' import { afterAll, jest, beforeAll, expect } from '@jest/globals'
import { liquid } from '#src/content-render/index.js' import { liquid } from '#src/content-render/index.js'
import languages from '#src/languages/lib/languages.js' import languages from '#src/languages/lib/languages.js'
import { DataDirectory } from '../../../tests/helpers/data-directory.js' import { DataDirectory } from '#src/tests/helpers/data-directory.js'
describe('liquid helper tags', () => { describe('liquid helper tags', () => {
jest.setTimeout(60 * 1000) jest.setTimeout(60 * 1000)

View File

@@ -33,7 +33,7 @@ import path from 'path'
import { jest } from '@jest/globals' import { jest } from '@jest/globals'
import { head, get } from '../../../tests/helpers/e2etest.js' import { head, get } from '#src/tests/helpers/e2etest.js'
import { loadPages } from '#src/frame/lib/page-data.js' import { loadPages } from '#src/frame/lib/page-data.js'
const EMPTY = Symbol('EMPTY') const EMPTY = Symbol('EMPTY')

View File

@@ -9,7 +9,7 @@ import {
getDeepDataByLanguage, getDeepDataByLanguage,
getUIDataMerged, getUIDataMerged,
} from '#src/data-directory/lib/get-data.js' } from '#src/data-directory/lib/get-data.js'
import { DataDirectory } from '../helpers/data-directory.js' import { DataDirectory } from '#src/tests/helpers/data-directory.js'
describe('get-data', () => { describe('get-data', () => {
let dd let dd

View File

@@ -3,8 +3,8 @@ import path from 'path'
import { expect } from '@jest/globals' import { expect } from '@jest/globals'
import { testViaActionsOnly } from '../../../tests/helpers/conditional-runs.js' import { testViaActionsOnly } from '#src/tests/helpers/conditional-runs.js'
import { get, getDOM } from '../../../tests/helpers/e2etest.js' import { get, getDOM } from '#src/tests/helpers/e2etest.js'
describe('cloning early-access', () => { describe('cloning early-access', () => {
testViaActionsOnly('the content directory exists', async () => { testViaActionsOnly('the content directory exists', async () => {

View File

@@ -1,7 +1,7 @@
import { expect, jest, test } from '@jest/globals' import { expect, jest, test } from '@jest/globals'
import { get, getDOM } from '../../../tests/helpers/e2etest.js' import { get, getDOM } from '#src/tests/helpers/e2etest.js'
import { describeIfDocsEarlyAccess } from '../../../tests/helpers/conditional-runs.js' import { describeIfDocsEarlyAccess } from '#src/tests/helpers/conditional-runs.js'
import languages from '#src/languages/lib/languages.js' import languages from '#src/languages/lib/languages.js'
const VALID_EARLY_ACCESS_URI = '/early-access/github/save-time-with-slash-commands' const VALID_EARLY_ACCESS_URI = '/early-access/github/save-time-with-slash-commands'

View File

@@ -1,5 +1,5 @@
import { expect, jest } from '@jest/globals' import { expect, jest } from '@jest/globals'
import { post } from '../../../tests/helpers/e2etest.js' import { post } from '#src/tests/helpers/e2etest.js'
describe('POST /events', () => { describe('POST /events', () => {
jest.setTimeout(60 * 1000) jest.setTimeout(60 * 1000)

0
src/fixtures/README.md Normal file
View File

View File

@@ -17,7 +17,7 @@ have to worry about breaking tests of functionality.
## How to write fixtured based rendering tests ## How to write fixtured based rendering tests
The content is in `tests/fixtures/content/` (and `tests/fixtures/data/`) The content is in `src/fixtures/fixtures/content/` (and `src/fixtures/fixtures/data/`)
is a cut down version of the real `content/` (and `data/`) at the root. is a cut down version of the real `content/` (and `data/`) at the root.
It doesn't have nearly as many pages and if you look closely you'll see It doesn't have nearly as many pages and if you look closely you'll see
references and mentions to unrealistic things like "foo" or "HubGit" references and mentions to unrealistic things like "foo" or "HubGit"
@@ -26,7 +26,7 @@ with any silly name, the code is modular and good.
### Quickstart ### Quickstart
Navigate around in `tests/fixtures/content/` and familiarize yourself Navigate around in `src/fixtures/fixtures/content/` and familiarize yourself
with the directory structure. The only things that are "identical" to the with the directory structure. The only things that are "identical" to the
real content is the top-level product names which match the real content. real content is the top-level product names which match the real content.
Deeper than the product level, the names and directories can be whatever Deeper than the product level, the names and directories can be whatever
@@ -47,13 +47,13 @@ action.
Feel free to create sub-directories or new files. For example, if it's Feel free to create sub-directories or new files. For example, if it's
about end-to-end testing a new custom Liquid tag called about end-to-end testing a new custom Liquid tag called
`lib/liquid-tags/snacks.js` you create a new test called `lib/liquid-tags/snacks.js` you create a new test called
`tests/rendering-fixtures/snack.js`. (And equally, you might want to create `src/fixtures/tests/snack.js`. (And equally, you might want to create
`tests/fixtures/content/get-started/foo/snacking.md`) `src/fixtures/fixtures/content/get-started/foo/snacking.md`)
To run the tests use: To run the tests use:
```shell ```shell
ROOT=tests/fixtures jest tests/rendering-fixtures/ ROOT=src/fixtures/fixtures jest src/fixtures/tests
``` ```
### Exceptions ### Exceptions

Some files were not shown because too many files have changed in this diff Show More