wip(ssr): should only render renderable values
This commit is contained in:
@@ -53,6 +53,16 @@ describe('ssr: renderAttrs', () => {
|
||||
).toBe(` foo="false"`) // non boolean should render `false` as is
|
||||
})
|
||||
|
||||
test('ingore non-renderable values', () => {
|
||||
expect(
|
||||
renderAttrs({
|
||||
foo: {},
|
||||
bar: [],
|
||||
baz: () => {}
|
||||
})
|
||||
).toBe(``)
|
||||
})
|
||||
|
||||
test('props to attrs', () => {
|
||||
expect(
|
||||
renderAttrs({
|
||||
|
||||
Reference in New Issue
Block a user