16 lines
653 B
TypeScript
16 lines
653 B
TypeScript
import test from "node:test";
|
|
import assert from "node:assert/strict";
|
|
import { createSetupSuggestTool } from "./setup-suggest.ts";
|
|
|
|
test("dev_tools_suggest_setup returns a concrete recommendation string", async () => {
|
|
const tool = createSetupSuggestTool({
|
|
suggestSetup: async () => "TypeScript project detected. Recommended: bunx biome init and npm i -D typescript-language-server.",
|
|
});
|
|
|
|
const result = await tool.execute("tool-1", {}, undefined, undefined, undefined);
|
|
const text = result.content[0]?.type === "text" ? result.content[0].text : "";
|
|
|
|
assert.match(text, /TypeScript project detected/);
|
|
assert.match(text, /biome/);
|
|
});
|