(
files: Record<string, string>,
options: { dirs?: readonly string[] } = {},
)
| 7 | import { parseManifest } from '../../src/plugin/manifest'; |
| 8 | |
| 9 | async function makePlugin( |
| 10 | files: Record<string, string>, |
| 11 | options: { dirs?: readonly string[] } = {}, |
| 12 | ): Promise<string> { |
| 13 | const root = await mkdtemp(path.join(tmpdir(), 'kimi-plugin-test-')); |
| 14 | for (const dir of options.dirs ?? []) { |
| 15 | await mkdir(path.join(root, dir), { recursive: true }); |
| 16 | } |
| 17 | for (const [rel, body] of Object.entries(files)) { |
| 18 | await mkdir(path.dirname(path.join(root, rel)), { recursive: true }); |
| 19 | await writeFile(path.join(root, rel), body, 'utf8'); |
| 20 | } |
| 21 | return realpath(root); |
| 22 | } |
| 23 | |
| 24 | describe('parseManifest', () => { |
| 25 | it('reads a minimal kimi.plugin.json at the plugin root', async () => { |
no test coverage detected