Files
nuxtci/tests/page.spec.ts
valere c5da118661
All checks were successful
Deploy App / test (push) Successful in 9s
Deploy App / deploy (push) Successful in 51s
test
2025-09-20 00:48:03 +02:00

17 lines
546 B
TypeScript

import fs from 'fs'
import path from 'path'
import { mount } from '@vue/test-utils'
import { describe, it, expect } from 'vitest'
const pagesDir = path.resolve(__dirname, '../pages')
const pages = fs.readdirSync(pagesDir).filter(f => f.endsWith('.vue'))
describe('Sanity check: pages mount correctly', () => {
for (const page of pages) {
it(`should mount ${page} without unresolved components`, async () => {
const Page = (await import(path.join(pagesDir, page))).default
expect(() => mount(Page)).not.toThrow()
})
}
})