Ghost/ghost/core/test/unit/frontend/helpers
Nicholas Mizoguchi d6b7ebb517
Enforced more Mocha lint rules (#19720)
ref https://github.com/TryGhost/Ghost/issues/11038

1. Enforced lint rule
**[ghost/mocha/no-identical-title](https://github.com/lo1tuma/eslint-plugin-mocha/blob/main/docs/rules/no-identical-title.md)**
- Fixed relevant tests
2. Enforced lint rule
**[ghost/mocha/max-top-level-suites](https://github.com/lo1tuma/eslint-plugin-mocha/blob/main/docs/rules/max-top-level-suites.md)**
- No required fixes, as tests are compliant already

#### Additional details
Specifically for `ghost/mocha/no-identical-title` most fixes were simple
test description updates. Added comments to aid the PR review for the
ones that had relevant changes, and might require more attention. They
are as follows:
*
[e2e-api/admin/invites.test.js](https://github.com/TryGhost/Ghost/pull/19720#discussion_r1496397548):
Removed duplicated test (exact same code on both);
*
[e2e-api/admin/members.test.js](https://github.com/TryGhost/Ghost/pull/19720#discussion_r1496399107):
From the[ PR this was
introduced](73466c1c40 (diff-4dbc7e96e356428561085147e00e9acb5c71b58d4c1bd3d9fc9ac30e77c45be0L236-L237))
seems like author based his test on an existing one but possibly forgot
to rename it;
*
[unit/api/canary/utils/serializers/input/pages.test.js](https://github.com/TryGhost/Ghost/pull/19720#discussion_r1496400143):
The [page filter](https://github.com/TryGhost/Ghost/pull/14829/files)
was removed, so changed the description accordingly;
*
[unit/api/canary/utils/serializers/input/posts.test.js](https://github.com/TryGhost/Ghost/pull/19720#discussion_r1496400329):
The [page filter](https://github.com/TryGhost/Ghost/pull/14829/files)
was removed, so changed the description accordingly;
*
[unit/frontend/services/rendering/templates.test.js](https://github.com/TryGhost/Ghost/pull/19720#discussion_r1496402430):
Removed duplicated test
*
[unit/server/models/post.test.js](https://github.com/TryGhost/Ghost/pull/19720#discussion_r1496403529):
the change in [this
PR](https://github.com/TryGhost/Ghost/pull/14586/files#diff-c351cb589adefbb886570cfadb33b33eb8fdc12bde1024d1188cd18c165fc5e8L1010)
made three tests here mostly the same. Deduplicated them and kept only
one.
2024-04-16 09:37:06 +02:00
..
__snapshots__ 🐛 Fixed trailing slash and space in HTML metadata elements (#16778) 2023-05-17 08:51:32 +02:00
test_tpl Updated content cta to use global accent color property 2022-09-27 09:41:54 +05:30
utils Updated to use assert/strict everywhere (#17047) 2023-06-21 09:56:59 +01:00
asset.test.js Fixed configUtils and adapter cache issues in E2E tests (#16167) 2023-01-30 14:06:20 +01:00
authors.test.js Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
body_class.test.js Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
cancel_link.test.js Prevent error logs from occuring in Ghost unit test suite 2023-03-01 16:37:46 +00:00
comment_count.test.js Removed all unused variables from test files 2023-03-10 14:29:55 +01:00
comments.test.js Added Playwright tests to comments-ui 2023-06-22 15:06:13 +02:00
concat.test.js Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
content.test.js 🐛 Fixed missing accent color for default content cta (#15611) 2022-10-13 13:42:21 +05:30
date.test.js Updated to use assert/strict everywhere (#17047) 2023-06-21 09:56:59 +01:00
encode.test.js Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
excerpt.test.js Refactored shouldCompileToExpected into shared util 2022-10-30 15:26:29 +00:00
facebook_url.test.js Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
foreach.test.js Enforced more Mocha lint rules (#19720) 2024-04-16 09:37:06 +02:00
get.test.js Fixed get helper cache optimizations (#19865) 2024-03-15 00:18:15 +07:00
ghost_foot.test.js Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
ghost_head.test.js Updated page metadata to use author image over cover image (#17689) 2023-09-15 16:07:06 +02:00
has.test.js Enforced more Mocha lint rules (#19720) 2024-04-16 09:37:06 +02:00
img_url.test.js Fixed configUtils and adapter cache issues in E2E tests (#16167) 2023-01-30 14:06:20 +01:00
is.test.js Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
link_class.test.js Fixed configUtils and adapter cache issues in E2E tests (#16167) 2023-01-30 14:06:20 +01:00
link.test.js Fixed configUtils and adapter cache issues in E2E tests (#16167) 2023-01-30 14:06:20 +01:00
match.test.js Refactored shouldCompileToExpected into shared util 2022-10-30 15:26:29 +00:00
meta_description.test.js Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
meta_title.test.js Fixed configUtils and adapter cache issues in E2E tests (#16167) 2023-01-30 14:06:20 +01:00
navigation.test.js Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
next_post.test.js Removed all unused variables from test files 2023-03-10 14:29:55 +01:00
page_url.test.js Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
pagination.test.js Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
plural.test.js Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
post_class.test.js Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
prev_post.test.js Removed all unused variables from test files 2023-03-10 14:29:55 +01:00
price.test.js Fixed {{price}} helper to render empty instead of throwing 2023-01-31 21:01:19 +08:00
raw.test.js Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
readable_url.test.js Added {{readable_url}} helper (#18564) 2023-10-10 18:56:59 +00:00
reading_time.test.js Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
recommendations.test.js Fixed missing favicon layout in the Recommendations template (#18766) 2023-10-25 19:13:37 +00:00
search.test.js Refactored shouldCompileToExpected into shared util 2022-10-30 15:26:29 +00:00
t.test.js Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
tags.test.js Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
tiers.test.js Removed all unused variables from test files 2023-03-10 14:29:55 +01:00
title.test.js Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
total_members.test.js Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
total_paid_members.test.js Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
twitter_url.test.js Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
url.test.js Prevent error logs from occuring in Ghost unit test suite 2023-03-01 16:37:46 +00:00