test(cli): load markdown prompt templates
This commit is contained in:
parent
aede05e55f
commit
50ee804e2f
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue