chore: generate
This commit is contained in:
parent
236cfcbbc3
commit
fff36b70bc
1 changed files with 10 additions and 14 deletions
|
|
@ -227,13 +227,11 @@ describe("tool.edit", () => {
|
||||||
yield* put(filepath, original)
|
yield* put(filepath, original)
|
||||||
|
|
||||||
expect(
|
expect(
|
||||||
(
|
(yield* fail({
|
||||||
yield* fail({
|
filePath: filepath,
|
||||||
filePath: filepath,
|
oldString: ["function configure() {", " const enabled = true", "}"].join("\n"),
|
||||||
oldString: ["function configure() {", " const enabled = true", "}"].join("\n"),
|
newString: ["function configure() {", " const enabled = false", "}"].join("\n"),
|
||||||
newString: ["function configure() {", " const enabled = false", "}"].join("\n"),
|
})).message,
|
||||||
})
|
|
||||||
).message,
|
|
||||||
).toContain("Could not find oldString")
|
).toContain("Could not find oldString")
|
||||||
expect(yield* load(filepath)).toBe(original)
|
expect(yield* load(filepath)).toBe(original)
|
||||||
}),
|
}),
|
||||||
|
|
@ -247,13 +245,11 @@ describe("tool.edit", () => {
|
||||||
yield* put(filepath, original)
|
yield* put(filepath, original)
|
||||||
|
|
||||||
expect(
|
expect(
|
||||||
(
|
(yield* fail({
|
||||||
yield* fail({
|
filePath: filepath,
|
||||||
filePath: filepath,
|
oldString: ["function configure() {", " const enabled = true", "}"].join("\n"),
|
||||||
oldString: ["function configure() {", " const enabled = true", "}"].join("\n"),
|
newString: ["function configure() {", " const enabled = false", "}"].join("\n"),
|
||||||
newString: ["function configure() {", " const enabled = false", "}"].join("\n"),
|
})).message,
|
||||||
})
|
|
||||||
).message,
|
|
||||||
).toContain("Could not find oldString")
|
).toContain("Could not find oldString")
|
||||||
expect(yield* load(filepath)).toBe(original)
|
expect(yield* load(filepath)).toBe(original)
|
||||||
}),
|
}),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue