mirror of
https://github.com/cline/cline.git
synced 2026-09-21 05:10:09 +08:00
fixed test
This commit is contained in:
@@ -1,19 +1,20 @@
|
||||
import * as assert from "assert"
|
||||
import { describe, it } from "mocha"
|
||||
import { ClineMessage } from "../shared/ExtensionMessage"
|
||||
import { formatResponse } from "../core/prompts/responses"
|
||||
|
||||
suite("New Task Tool Tests", () => {
|
||||
test("formatResponse.newTaskContext formats context correctly", () => {
|
||||
describe("New Task Tool Tests", () => {
|
||||
it("formatResponse.newTaskContext formats context correctly", () => {
|
||||
const context = "This is a test context for a new task"
|
||||
const result = formatResponse.newTaskContext(context)
|
||||
|
||||
assert.strictEqual(
|
||||
result,
|
||||
`Cline wants to create a new task with the following context:\n\nThis is a test context for a new task\n\nClick "Create New Task" to start a new task with this context preloaded in Plan Mode.`,
|
||||
`Cline wants to start a new task with the following context:\n\nThis is a test context for a new task\n\nClick "Start New Task" to start a new task with this context preloaded.`,
|
||||
)
|
||||
})
|
||||
|
||||
test("ClineAskNewTask interface exists", () => {
|
||||
it("ClineAskNewTask interface exists", () => {
|
||||
// This is a type check test, it will fail at compile time if the interface doesn't exist
|
||||
const message: ClineMessage = {
|
||||
ts: Date.now(),
|
||||
|
||||
Reference in New Issue
Block a user