1
0
Fork 0
mirror of synced 2024-07-10 16:55:46 +12:00

Run js only for non-block

This commit is contained in:
Adria Navarro 2024-01-30 10:21:33 +01:00
parent eac30aa787
commit 061d1589af

View file

@ -58,7 +58,8 @@ const examples = collections.reduce((acc, collection) => {
}
}
}
return [name, { hbs, js }]
const hasHbsBody = details.isBlock
return [name, { hbs, js, hasHbsBody }]
})
.filter(x => !!x)
@ -108,7 +109,9 @@ describe("manifest", () => {
describe("can be parsed and run as js", () => {
describe.each(Object.keys(examples))("%s", collection => {
it.each(examples[collection])("%s", async (_, { hbs, js }) => {
it.each(
examples[collection].filter(([_, { hasHbsBody }]) => !hasHbsBody)
)("%s", async (_, { hbs, js }) => {
const context = {
double: i => i * 2,
isString: x => typeof x === "string",