mirror of
https://github.com/bitinflow/ui.git
synced 2026-03-13 13:45:59 +00:00
first commit
This commit is contained in:
15
test/basic.test.ts
Normal file
15
test/basic.test.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { describe, it, expect } from 'vitest'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
import { setup, $fetch } from '@nuxt/test-utils'
|
||||
|
||||
describe('ssr', async () => {
|
||||
await setup({
|
||||
rootDir: fileURLToPath(new URL('./fixtures/basic', import.meta.url)),
|
||||
})
|
||||
|
||||
it('renders the index page', async () => {
|
||||
// Get response to a server-rendered page with `$fetch`.
|
||||
const html = await $fetch('/')
|
||||
expect(html).toContain('<div>basic</div>')
|
||||
})
|
||||
})
|
||||
6
test/fixtures/basic/app.vue
vendored
Normal file
6
test/fixtures/basic/app.vue
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<template>
|
||||
<div>basic</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
</script>
|
||||
7
test/fixtures/basic/nuxt.config.ts
vendored
Normal file
7
test/fixtures/basic/nuxt.config.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import MyModule from '../../../src/module'
|
||||
|
||||
export default defineNuxtConfig({
|
||||
modules: [
|
||||
MyModule
|
||||
]
|
||||
})
|
||||
5
test/fixtures/basic/package.json
vendored
Normal file
5
test/fixtures/basic/package.json
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"private": true,
|
||||
"name": "basic",
|
||||
"type": "module"
|
||||
}
|
||||
Reference in New Issue
Block a user