Files
dify/cli/src/commands/coverage.test.ts
T
Stephen Zhouandautofix-ci[bot] a84c2d36a3 style: format with vp fmt (#38803)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-12 15:57:46 +00:00

22 lines
746 B
TypeScript

/// <reference types="vite/client" />
import { describe, expect, it } from 'vitest'
import { isExcludedCommandPath } from '@/framework/command-fs'
const INDEX_MODULES = import.meta.glob<{ default?: unknown }>('./**/index.ts', { eager: true })
const COMMAND_MODULES = Object.fromEntries(
Object.entries(INDEX_MODULES).filter(([path]) => !isExcludedCommandPath(path)),
)
describe('command folder coverage', () => {
it('discovers at least one command index', () => {
expect(Object.keys(COMMAND_MODULES).length).toBeGreaterThan(0)
})
describe.each(Object.entries(COMMAND_MODULES))('%s', (path, mod) => {
it('default export exists', () => {
expect(mod.default, `${path}: missing default export`).toBeDefined()
})
})
})