Skip to content

Commit

Permalink
test: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
KazariEX committed Aug 29, 2024
1 parent c7c6546 commit ca9ff3a
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions packages/server-renderer/__tests__/ssrRenderAttrs.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,6 @@ describe('ssr: renderAttr', () => {
` foo="${escapeHtml(`<script>`)}"`,
)
})

test('className', () => {
expect(ssrRenderAttr('className', 'foo')).toBe(` class="foo"`)
expect(ssrRenderAttr('className', ['foo', 'bar'])).toBe(` class="foo,bar"`)
})
})

describe('ssr: renderClass', () => {
Expand All @@ -148,6 +143,19 @@ describe('ssr: renderClass', () => {
test('escape class values', () => {
expect(ssrRenderClass(`"><script`)).toBe(`&quot;&gt;&lt;script`)
})

test('className', () => {
expect(
ssrRenderAttrs({
className: 'foo',
}),
).toBe(` class="foo"`)
expect(
ssrRenderAttrs({
className: ['foo', 'bar'],
}),
).toBe(` class="foo,bar"`)
})
})

describe('ssr: renderStyle', () => {
Expand Down

0 comments on commit ca9ff3a

Please sign in to comment.