Commit Graph

7 Commits

Author SHA1 Message Date
Daniel Lockyer
c6cb35074a Updated linting and testing packages 2023-09-01 15:51:17 +02:00
renovate[bot]
7dce046786 Update Test & linting packages 2023-07-11 15:26:07 +02:00
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
Naz
e541ea8746
Extracted announcement visibility values to single place
refs https://github.com/TryGhost/Team/issues/3010

- Having all possible values in within single packages will make it easier to look for "source of truth" and is more maintainable rather than having values scattered all over the codebase
2023-04-26 14:42:33 +02:00
Naz
02f9ecb7c1
Fixed announcement showing to visitors when set to paid_members
refs https://github.com/TryGhost/Team/issues/3051

- The filter was not working properly when there was no logged in member, but the announcement filter was set to "paid_members" only
2023-04-21 15:27:18 +02:00
Naz
6928235c48
Refactored announcement bar settings tests
refs https://github.com/TryGhost/Team/issues/3051

- Made unit tests in the announcement bar settings package more concise
2023-04-21 15:19:33 +02:00
Naz
cddf786424
Added filtering of announcement bar content
refs https://github.com/TryGhost/Team/issues/3051

-  We need to show the announcement_content to specific audiences based on the announcement_visibility filter
2023-04-21 13:46:37 +02:00