Ghost/ghost/core/test/unit/frontend/helpers
Hannah Wolfe 6161f94910
Updated to use assert/strict everywhere (#17047)
refs: https://github.com/TryGhost/Toolbox/issues/595

We're rolling out new rules around the node assert library, the first of which is enforcing the use of assert/strict. This means we don't need to use the strict version of methods, as the standard version will work that way by default.

This caught some gotchas in our existing usage of assert where the lack of strict mode had unexpected results:
- Url matching needs to be done on `url.href` see aa58b354a4
- Null and undefined are not the same thing,  there were a few cases of this being confused
- Particularly questionable changes in [PostExporter tests](c1a468744b) tracked [here](https://github.com/TryGhost/Team/issues/3505).
- A typo see eaac9c293a

Moving forward, using assert strict should help us to catch unexpected behaviour, particularly around nulls and undefineds during implementation.
2023-06-21 09:56:59 +01: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 Fixed configUtils and adapter cache issues in E2E tests (#16167) 2023-01-30 14:06:20 +01: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 Refactored shouldCompileToExpected into shared util 2022-10-30 15:26:29 +00:00
get.test.js Removed all unused variables from test files 2023-03-10 14:29:55 +01:00
ghost_foot.test.js Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
ghost_head.test.js Removed all unused variables from test files 2023-03-10 14:29:55 +01:00
has.test.js Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +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
reading_time.test.js Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02: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