fix: components with popover throws error in SSR

This commit is contained in:
07akioni 2021-09-25 19:35:17 +08:00
parent 698e557797
commit 8d3d98102e
79 changed files with 1502 additions and 0 deletions

View File

@ -12,6 +12,7 @@
- Fix `n-drawer` border transition, closes[#1211].
- Fix `n-input-number`'s `value` prop can't be `null` type.
- Fix components with rtl support throws error in SSR.
- Fix components with popover throws error in SSR.
### Feats

View File

@ -12,6 +12,7 @@
- 修复 `n-drawer` 边界缺少 transition关闭 [#1211]
- 修复 `n-input-number``value` 属性不能为 null 类型
- 修复支持 rtl 的组件 SSR 报错
- 修复有弹出层组件的 SSR 报错
### Feats

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NAffix } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NAffix />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NAlert } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NAlert />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NAnchor } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NAnchor />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NAutoComplete } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NAutoComplete />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NAvatar } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NAvatar />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NBackTop } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NBackTop />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NBadge } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NBadge />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NBreadcrumb } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NBreadcrumb />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NButton } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NButton />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NCalendar } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NCalendar />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NCard } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NCard />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NCarousel } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NCarousel />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NCascader } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NCascader />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NCheckbox } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NCheckbox />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NCode } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NCode />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NCollapse } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NCollapse />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NColorPicker } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NColorPicker />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NDataTable } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NDataTable />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NDatePicker } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NDatePicker />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NDescriptions } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NDescriptions />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NDialog } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NDialog />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NDivider } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NDivider />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NDrawer } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NDrawer />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NDropdown } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NDropdown />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NDynamicInput } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NDynamicInput />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NDynamicTags } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NDynamicTags />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NElement } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NElement />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,25 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NEllipsis } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => (
<NEllipsis>
{{
trigger: () => 'kirby'
}}
</NEllipsis>
))
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NEmpty } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NEmpty />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NForm } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NForm />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NGradientText } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NGradientText />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NGrid } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NGrid />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NIcon } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NIcon />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NImage } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NImage />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NInputNumber } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NInputNumber />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NInput } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NInput />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NLayout } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NLayout />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,25 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NRow, NCol } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => (
<NRow>
{{
default: () => <NCol />
}}
</NRow>
))
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NList } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NList />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NLoadingBar } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NLoadingBar />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NLog } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NLog />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NMention } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NMention />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NMenu } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NMenu />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NMessage } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NMessage />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NModal } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NModal />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NNotification } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NNotification />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NPageHeader } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NPageHeader />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NPagination } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NPagination />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,25 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NPopconfirm } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => (
<NPopconfirm>
{{
default: () => 'kirby'
}}
</NPopconfirm>
))
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,26 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NPopover } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => (
<NPopover>
{{
trigger: () => 'kirby'
}}
</NPopover>
))
setup(app)
try {
await renderToString(app)
} catch (e) {
console.error(e)
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,25 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NPopselect } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => (
<NPopselect>
{{
trigger: () => 'kirby'
}}
</NPopselect>
))
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NProgress } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NProgress />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NRadio } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NRadio />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NRate } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NRate />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NResult } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NResult />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NScrollbar } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NScrollbar />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NSelect } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NSelect />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NSkeleton } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NSkeleton />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NSlider } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NSlider />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NSpace } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NSpace />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NSpin } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NSpin />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NStatistic } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NStatistic />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NSteps } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NSteps />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NSwitch } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NSwitch />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NTable } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NTable />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NTabs } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NTabs />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NTag } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NTag />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NThing } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NThing />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NTimePicker } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NTimePicker />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NTime } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NTime />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NTimeline } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NTimeline />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,25 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NTooltip } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => (
<NTooltip>
{{
trigger: () => 'kirby'
}}
</NTooltip>
))
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NTransfer } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NTransfer />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NTreeSelect } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NTreeSelect />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NTree } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NTree />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NText } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NText />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})

View File

@ -0,0 +1,19 @@
/**
* @jest-environment node
*/
import { h, createSSRApp } from 'vue'
import { renderToString } from '@vue/server-renderer'
import { setup } from '@css-render/vue3-ssr'
import { NUpload } from '../..'
describe('SSR', () => {
it('works', async () => {
const app = createSSRApp(() => <NUpload />)
setup(app)
try {
await renderToString(app)
} catch (e) {
expect(e).not.toBeTruthy()
}
})
})