Ghost/ghost/core
Hannah Wolfe a8b1676734
Refactored shouldCompileToExpected into shared util
no issue

- There are currently two patterns in our handlebars helper unit tests:
  1. Treating the helper as a function, and doing a function call
   - This is the original way the tests were done, and they're not great as they're approximating how the helpers are really used
  2. Using a template string, and rendering the string using a method called shouldCompileToExpected
   - These tests are more realistic and powerful and also easier to read

- The new method is only being used in a few places so far, and each place had re-created the `shouldCompileToExpected` method
- Therefore I've moved this method into a util that should make it easier to write unit tests for handlebars helpers
- I also renamed the method in the excerpt tests, because it doesn't do the same thing, it's just a wrapper around a function call rather than compiling a string

The aim is to refactor all of our handlebars helper tests to use `shouldCompileToExpected`
2022-10-30 15:26:29 +00:00
..
content 🎨 Updated Casper to v5.3.2 2022-10-07 16:00:52 +01:00
core Updated cache invalidation handling on link edit (#15718) 2022-10-28 02:48:42 +05:30
test Refactored shouldCompileToExpected into shared util 2022-10-30 15:26:29 +00:00
.c8rc.json Extracted shared API framework to separate package 2022-08-11 17:44:59 +02:00
.eslintignore Updated .eslintignore list for core 2022-10-10 15:12:52 +07:00
.eslintrc.js Updated Eslint ECMAScript compatibility to 2022 2022-08-09 15:51:40 +02:00
.gitignore Added copied release assets into .gitignore 2022-08-10 14:19:16 +02:00
.npmignore Cleaned up npmignore entries for Casper 2022-09-01 08:22:01 +01:00
config.development.json Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
ghost.js Added command to generate demo data (#15691) 2022-10-26 17:55:08 +01:00
index.js Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
jsconfig.json Deleted reference to core/admin 2022-08-03 16:28:41 +02:00
loggingrc.js Switched to original version for metrics 2022-08-04 19:22:57 +02:00
MigratorConfig.js Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
package.json v5.21.0 2022-10-28 16:00:39 +01:00