test(cli): load markdown prompt templates

This commit is contained in:
yyovil 2026-04-13 21:28:27 +05:30
parent aede05e55f
commit 50ee804e2f
1 changed files with 14 additions and 0 deletions

View File

@ -1,7 +1,21 @@
import { readFile } from "node:fs/promises";
import { resolve } from "node:path";
import { defineConfig } from "vitest/config";
export default defineConfig({
plugins: [
{
name: "raw-markdown",
enforce: "pre",
async load(id) {
if (!id.endsWith(".md")) {
return null;
}
return `export default ${JSON.stringify(await readFile(id, "utf8"))};`;
},
},
],
test: {
include: ["__tests__/**/*.test.ts"],
testTimeout: 10000,