mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-21 04:50:14 +08:00
fix: components with popover throws error in SSR
This commit is contained in:
parent
698e557797
commit
8d3d98102e
@ -12,6 +12,7 @@
|
|||||||
- Fix `n-drawer` border transition, closes[#1211].
|
- Fix `n-drawer` border transition, closes[#1211].
|
||||||
- Fix `n-input-number`'s `value` prop can't be `null` type.
|
- Fix `n-input-number`'s `value` prop can't be `null` type.
|
||||||
- Fix components with rtl support throws error in SSR.
|
- Fix components with rtl support throws error in SSR.
|
||||||
|
- Fix components with popover throws error in SSR.
|
||||||
|
|
||||||
### Feats
|
### Feats
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
- 修复 `n-drawer` 边界缺少 transition,关闭 [#1211]
|
- 修复 `n-drawer` 边界缺少 transition,关闭 [#1211]
|
||||||
- 修复 `n-input-number` 的 `value` 属性不能为 null 类型
|
- 修复 `n-input-number` 的 `value` 属性不能为 null 类型
|
||||||
- 修复支持 rtl 的组件 SSR 报错
|
- 修复支持 rtl 的组件 SSR 报错
|
||||||
|
- 修复有弹出层组件的 SSR 报错
|
||||||
|
|
||||||
### Feats
|
### Feats
|
||||||
|
|
||||||
|
19
src/affix/tests/server.spec.tsx
Normal file
19
src/affix/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/alert/tests/server.spec.tsx
Normal file
19
src/alert/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/anchor/tests/server.spec.tsx
Normal file
19
src/anchor/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/auto-complete/tests/server.spec.tsx
Normal file
19
src/auto-complete/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/avatar/tests/server.spec.tsx
Normal file
19
src/avatar/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/back-top/tests/server.spec.tsx
Normal file
19
src/back-top/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/badge/tests/server.spec.tsx
Normal file
19
src/badge/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/breadcrumb/tests/server.spec.tsx
Normal file
19
src/breadcrumb/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/button/tests/server.spec.tsx
Normal file
19
src/button/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/calendar/tests/server.spec.tsx
Normal file
19
src/calendar/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/card/tests/server.spec.tsx
Normal file
19
src/card/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/carousel/tests/server.spec.tsx
Normal file
19
src/carousel/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/cascader/tests/server.spec.tsx
Normal file
19
src/cascader/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/checkbox/tests/server.spec.tsx
Normal file
19
src/checkbox/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/code/tests/server.spec.tsx
Normal file
19
src/code/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/collapse/tests/server.spec.tsx
Normal file
19
src/collapse/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/color-picker/tests/server.spec.tsx
Normal file
19
src/color-picker/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/data-table/tests/server.spec.tsx
Normal file
19
src/data-table/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/date-picker/tests/server.spec.tsx
Normal file
19
src/date-picker/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/descriptions/tests/server.spec.tsx
Normal file
19
src/descriptions/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/dialog/tests/server.spec.tsx
Normal file
19
src/dialog/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/divider/tests/server.spec.tsx
Normal file
19
src/divider/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/drawer/tests/server.spec.tsx
Normal file
19
src/drawer/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/dropdown/tests/server.spec.tsx
Normal file
19
src/dropdown/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/dynamic-input/tests/server.spec.tsx
Normal file
19
src/dynamic-input/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/dynamic-tags/tests/server.spec.tsx
Normal file
19
src/dynamic-tags/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/element/tests/server.spec.tsx
Normal file
19
src/element/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
25
src/ellipsis/tests/server.spec.tsx
Normal file
25
src/ellipsis/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/empty/tests/server.spec.tsx
Normal file
19
src/empty/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/form/tests/server.spec.tsx
Normal file
19
src/form/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/gradient-text/tests/server.spec.tsx
Normal file
19
src/gradient-text/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/grid/tests/server.spec.tsx
Normal file
19
src/grid/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/icon/tests/server.spec.tsx
Normal file
19
src/icon/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/image/tests/server.spec.tsx
Normal file
19
src/image/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/input-number/tests/server.spec.tsx
Normal file
19
src/input-number/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/input/tests/server.spec.tsx
Normal file
19
src/input/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/layout/tests/server.spec.tsx
Normal file
19
src/layout/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
25
src/legacy-grid/tests/server.spec.tsx
Normal file
25
src/legacy-grid/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/list/tests/server.spec.tsx
Normal file
19
src/list/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/loading-bar/tests/server.spec.tsx
Normal file
19
src/loading-bar/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/log/tests/server.spec.tsx
Normal file
19
src/log/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/mention/tests/server.spec.tsx
Normal file
19
src/mention/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/menu/tests/server.spec.tsx
Normal file
19
src/menu/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/message/tests/server.spec.tsx
Normal file
19
src/message/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/modal/tests/server.spec.tsx
Normal file
19
src/modal/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/notification/tests/server.spec.tsx
Normal file
19
src/notification/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/page-header/tests/server.spec.tsx
Normal file
19
src/page-header/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/pagination/tests/server.spec.tsx
Normal file
19
src/pagination/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
25
src/popconfirm/tests/server.spec.tsx
Normal file
25
src/popconfirm/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
26
src/popover/tests/server.spec.tsx
Normal file
26
src/popover/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
25
src/popselect/tests/server.spec.tsx
Normal file
25
src/popselect/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/progress/tests/server.spec.tsx
Normal file
19
src/progress/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/radio/tests/server.spec.tsx
Normal file
19
src/radio/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/rate/tests/server.spec.tsx
Normal file
19
src/rate/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/result/tests/server.spec.tsx
Normal file
19
src/result/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/scrollbar/tests/server.spec.tsx
Normal file
19
src/scrollbar/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/select/tests/server.spec.tsx
Normal file
19
src/select/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/skeleton/tests/server.spec.tsx
Normal file
19
src/skeleton/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/slider/tests/server.spec.tsx
Normal file
19
src/slider/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/space/tests/server.spec.tsx
Normal file
19
src/space/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/spin/tests/server.spec.tsx
Normal file
19
src/spin/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/statistic/tests/server.spec.tsx
Normal file
19
src/statistic/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/steps/tests/server.spec.tsx
Normal file
19
src/steps/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/switch/tests/server.spec.tsx
Normal file
19
src/switch/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/table/tests/server.spec.tsx
Normal file
19
src/table/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/tabs/tests/server.spec.tsx
Normal file
19
src/tabs/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/tag/tests/server.spec.tsx
Normal file
19
src/tag/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/thing/tests/server.spec.tsx
Normal file
19
src/thing/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/time-picker/tests/server.spec.tsx
Normal file
19
src/time-picker/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/time/tests/server.spec.tsx
Normal file
19
src/time/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/timeline/tests/server.spec.tsx
Normal file
19
src/timeline/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
25
src/tooltip/tests/server.spec.tsx
Normal file
25
src/tooltip/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/transfer/tests/server.spec.tsx
Normal file
19
src/transfer/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/tree-select/tests/server.spec.tsx
Normal file
19
src/tree-select/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/tree/tests/server.spec.tsx
Normal file
19
src/tree/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/typography/tests/server.spec.tsx
Normal file
19
src/typography/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
19
src/upload/tests/server.spec.tsx
Normal file
19
src/upload/tests/server.spec.tsx
Normal 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()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
Loading…
Reference in New Issue
Block a user