wip(ssr): should only render renderable values

This commit is contained in:
Evan You
2020-02-05 15:21:20 -05:00
parent 8f9e85afb1
commit ae92925011
2 changed files with 20 additions and 2 deletions

View File

@@ -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({