Ghost/ghost/core/test/unit/server/models
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
..
base Updated to use assert/strict everywhere (#17047) 2023-06-21 09:56:59 +01:00
api-key.test.js Removed all unused variables from test files 2023-03-10 14:29:55 +01:00
comment.test.js Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
custom-theme-setting.test.js Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
email-spam-complaint-event.test.js Updated to use assert/strict everywhere (#17047) 2023-06-21 09:56:59 +01:00
integration.test.js Removed all unused variables from test files 2023-03-10 14:29:55 +01:00
invite.test.js Fixed Editors being able to invite Editors (#19904) 2024-03-26 00:45:08 +07:00
member-click-event.test.js Added post_id filter and total to activity feed API (#15650) 2022-10-18 15:52:04 +02:00
member-created-event.test.js Added ENUM validation for member/subscription created events (#15312) 2022-08-25 15:39:37 +02:00
member-feedback.test.js Added members_feedback table (#15581) 2022-10-11 13:21:31 +02:00
member-paid-subscription-event.test.js Added post_id filter and total to activity feed API (#15650) 2022-10-18 15:52:04 +02:00
member-subscribe-event.test.js Added ENUM validation for member/subscription created events (#15312) 2022-08-25 15:39:37 +02:00
member.test.js Fixed configUtils and adapter cache issues in E2E tests (#16167) 2023-01-30 14:06:20 +01:00
milestone.test.js Updated to use assert/strict everywhere (#17047) 2023-06-21 09:56:59 +01:00
newsletter.test.js Removed all unused variables from test files 2023-03-10 14:29:55 +01:00
permission.test.js Removed all unused variables from test files 2023-03-10 14:29:55 +01:00
post.test.js Enforced more Mocha lint rules (#19720) 2024-04-16 09:37:06 +02:00
session.test.js Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
settings.test.js Removed all unused variables from test files 2023-03-10 14:29:55 +01:00
single-use-token.test.js Updated to use assert/strict everywhere (#17047) 2023-06-21 09:56:59 +01:00
stripe-customer-subscription.test.js Removed all unused variables from test files 2023-03-10 14:29:55 +01:00
subscription-created-event.test.js Added ENUM validation for member/subscription created events (#15312) 2022-08-25 15:39:37 +02:00
suppression.test.js Updated to use assert/strict everywhere (#17047) 2023-06-21 09:56:59 +01:00
tag.test.js Removed all unused variables from test files 2023-03-10 14:29:55 +01:00
user.test.js Removed all unused variables from test files 2023-03-10 14:29:55 +01:00