it's alive
This commit is contained in:
parent
e413fc1ff6
commit
859ed7402a
|
|
@ -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