Risky Business: omit do when passing a 0 arg function to a function
#22
2
bun.lock
2
bun.lock
|
|
@ -62,7 +62,7 @@
|
|||
|
||||
"hono": ["hono@4.9.8", "", {}, "sha512-JW8Bb4RFWD9iOKxg5PbUarBYGM99IcxFl2FPBo2gSJO11jjUDqlP1Bmfyqt8Z/dGhIQ63PMA9LdcLefXyIasyg=="],
|
||||
|
||||
"reefvm": ["reefvm@git+https://git.nose.space/defunkt/reefvm#c69b172c78853756ec8acba5bc33d93eb6a571c6", { "peerDependencies": { "typescript": "^5" } }, "c69b172c78853756ec8acba5bc33d93eb6a571c6"],
|
||||
"reefvm": ["reefvm@git+https://git.nose.space/defunkt/reefvm#0f39e9401eb7a0a7c906e150127f9829458a79b6", { "peerDependencies": { "typescript": "^5" } }, "0f39e9401eb7a0a7c906e150127f9829458a79b6"],
|
||||
|
||||
"style-mod": ["style-mod@4.1.2", "", {}, "sha512-wnD1HyVqpJUI2+eKZ+eo1UwghftP6yuFheBqqe+bWCotBjC2K1YnteJILRMs3SM4V/0dLEW1SC27MWP5y+mwmw=="],
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import { expect, describe, test, beforeEach } from 'bun:test'
|
||||
import { type Value } from 'reefvm'
|
||||
|
||||
const buffer: string[] = []
|
||||
|
||||
|
|
@ -8,8 +7,8 @@ const ribbitGlobals = {
|
|||
await cb()
|
||||
return buffer.join("\n")
|
||||
},
|
||||
tag: (tagName: string, atDefaults = {}) => {
|
||||
return (atNamed = {}, ...args: any[]) => tag(tagName, Object.assign({}, atDefaults, atNamed), ...args)
|
||||
tag: async (tagFn: Function, atDefaults = {}) => {
|
||||
return (atNamed = {}, ...args: any[]) => tagFn(Object.assign({}, atDefaults, atNamed), ...args)
|
||||
},
|
||||
head: (atNamed: {}, ...args: any[]) => tag('head', atNamed, ...args),
|
||||
title: (atNamed: {}, ...args: any[]) => tag('title', atNamed, ...args),
|
||||
|
|
@ -81,7 +80,7 @@ end
|
|||
|
||||
test('custom tags', () => {
|
||||
expect(`
|
||||
list = tag 'ul' class=list
|
||||
list = tag ul class=list
|
||||
ribbit:
|
||||
list:
|
||||
li border-bottom='1px solid black' one
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user