@criogaid/pi-hashline-edit 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -10
- package/README.zh-CN.md +8 -9
- package/THIRD_PARTY_NOTICES.md +0 -6
- package/package.json +1 -1
- package/src/core/AGENTS.md +4 -5
- package/src/core/apply.test.ts +96 -271
- package/src/core/apply.ts +62 -169
- package/src/core/case-fold.ts +8 -67
- package/src/core/character-set.ts +4 -4
- package/src/core/errors.test.ts +23 -7
- package/src/core/errors.ts +32 -5
- package/src/core/hash.test.ts +8 -16
- package/src/core/hash.ts +3 -23
- package/src/core/lines.ts +2 -4
- package/src/core/regex.ts +3 -4
- package/src/core/replace.test.ts +47 -1
- package/src/core/replace.ts +19 -13
- package/src/core/search-analysis.test.ts +24 -27
- package/src/core/search-analysis.ts +34 -65
- package/src/core/search-matrix.testing.ts +0 -2
- package/src/core/search.ts +1 -1
- package/src/core/text.test.ts +5 -5
- package/src/core/text.ts +5 -12
- package/src/core/types.ts +7 -43
- package/src/integration/fusion-dispatch.test.ts +2 -5
- package/src/integration/grep-flags.test.ts +0 -14
- package/src/integration/grep-js-completeness.test.ts +34 -8
- package/src/integration/grep-line-candidates.test.ts +4 -8
- package/src/integration/grep-matrix.test.ts +3 -7
- package/src/integration/grep-path-matrix.test.ts +5 -5
- package/src/integration/grep-prefilter-coverage.test.ts +3 -7
- package/src/integration/grep-process-limits.test.ts +78 -0
- package/src/integration/grep-rg.test.ts +118 -20
- package/src/integration/grep-scan-budget.test.ts +2 -2
- package/src/integration/grep-translation.test.ts +12 -27
- package/src/integration/large-text.test.ts +1 -47
- package/src/integration/model-budget-lifecycle.test.ts +2 -1
- package/src/integration/publication-read-changes.test.ts +123 -45
- package/src/integration/replace-worker-boundary.test.ts +21 -11
- package/src/integration/report-replay.test.ts +20 -22
- package/src/pi/AGENTS.md +15 -15
- package/src/pi/action-fusion.test.ts +164 -296
- package/src/pi/action-fusion.ts +148 -111
- package/src/pi/anchor-format.test.ts +9 -9
- package/src/pi/anchor-format.ts +6 -8
- package/src/pi/argument-diagnostics.ts +21 -25
- package/src/pi/argument-error.ts +2 -1
- package/src/pi/argument-validation.test.ts +129 -157
- package/src/pi/argument-validation.ts +5 -8
- package/src/pi/budgets.ts +5 -4
- package/src/pi/config.test.ts +5 -2
- package/src/pi/config.ts +4 -6
- package/src/pi/diagnostic-buffer.test.ts +12 -1
- package/src/pi/diagnostic-buffer.ts +1 -2
- package/src/pi/directory-sync.test.ts +0 -1
- package/src/pi/edit-tool.ts +46 -156
- package/src/pi/error-text.ts +4 -8
- package/src/pi/execute.test.ts +83 -196
- package/src/pi/failure-context.test.ts +144 -126
- package/src/pi/failure-context.ts +44 -93
- package/src/pi/failure-path.test.ts +168 -141
- package/src/pi/file-commit.test.ts +110 -53
- package/src/pi/file-commit.ts +90 -137
- package/src/pi/file-snapshot.test.ts +3 -5
- package/src/pi/fusion-card.test.ts +4 -1
- package/src/pi/fusion-card.ts +16 -24
- package/src/pi/grep-candidates.test.ts +2 -101
- package/src/pi/grep-candidates.ts +23 -69
- package/src/pi/grep-matrix.test.ts +2 -2
- package/src/pi/grep-order.test.ts +4 -4
- package/src/pi/grep-output.ts +62 -96
- package/src/pi/grep-render.ts +1 -1
- package/src/pi/grep-reread.ts +92 -0
- package/src/pi/grep-scope.ts +40 -42
- package/src/pi/grep-search.ts +22 -31
- package/src/pi/grep-tool.ts +55 -82
- package/src/pi/grep.test.ts +80 -45
- package/src/pi/model-budgets.test.ts +25 -23
- package/src/pi/model-budgets.ts +6 -38
- package/src/pi/mutation-result.test.ts +44 -35
- package/src/pi/mutation-result.ts +51 -20
- package/src/pi/mutation-runner.ts +126 -70
- package/src/pi/output-budgets.test.ts +36 -14
- package/src/pi/path.ts +1 -1
- package/src/pi/read-tool.ts +5 -5
- package/src/pi/regex-worker-contract.ts +3 -13
- package/src/pi/regex-worker.ts +1 -10
- package/src/pi/registration.test.ts +64 -36
- package/src/pi/render.test.ts +38 -28
- package/src/pi/render.ts +59 -63
- package/src/pi/replace-regex.ts +14 -2
- package/src/pi/replace-tool.ts +20 -82
- package/src/pi/replace-worker.ts +1 -1
- package/src/pi/replace.test.ts +9 -5
- package/src/pi/report-cause.ts +3 -8
- package/src/pi/report-failure.testing.ts +1 -2
- package/src/pi/report-schema.ts +62 -81
- package/src/pi/report.test.ts +171 -25
- package/src/pi/report.ts +33 -87
- package/src/pi/result-safety.test.ts +149 -176
- package/src/pi/rg-process.test.ts +77 -63
- package/src/pi/rg-process.ts +48 -64
- package/src/pi/rg-regex.ts +40 -400
- package/src/pi/schema.ts +12 -0
- package/src/pi/text-stream.test.ts +0 -21
- package/src/pi/text-stream.ts +14 -21
- package/src/pi/write-tool.ts +33 -62
- package/src/pi/write.test.ts +1 -3
- package/src/testing/regex-translation-corpus.ts +12 -12
- package/src/pi/replace-worker-contract.ts +0 -10
|
@@ -4,14 +4,12 @@ import { tmpdir } from "node:os";
|
|
|
4
4
|
import { join } from "node:path";
|
|
5
5
|
import assert from "node:assert/strict";
|
|
6
6
|
import { test } from "node:test";
|
|
7
|
-
import { createActionFusionExecutor
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { CommandNotRun, describeFailure, renderReport, reportOf } from "./report.ts";
|
|
7
|
+
import { createActionFusionExecutor } from "./action-fusion.ts";
|
|
8
|
+
import type { ActionFusionProgress } from "./report-schema.ts";
|
|
9
|
+
import { outputBudgetsFor } from "./budgets.ts";
|
|
10
|
+
import { reportOf } from "./report.ts";
|
|
12
11
|
import { callTool, createToolContext } from "./tool-call.testing.ts";
|
|
13
12
|
import { makeWriteOverride } from "./write-tool.ts";
|
|
14
|
-
import { publishedMutation } from "./mutation-outcome.testing.ts";
|
|
15
13
|
|
|
16
14
|
async function withTemp<T>(run: (dir: string) => Promise<T>): Promise<T> {
|
|
17
15
|
const dir = await mkdtemp(join(tmpdir(), "hashline-failure-"));
|
|
@@ -21,7 +19,6 @@ async function withTemp<T>(run: (dir: string) => Promise<T>): Promise<T> {
|
|
|
21
19
|
await rm(dir, { recursive: true, force: true });
|
|
22
20
|
}
|
|
23
21
|
}
|
|
24
|
-
const mutation = (content: string) => publishedMutation(content, { content: [], details: {} });
|
|
25
22
|
|
|
26
23
|
test("temporary preparation and cleanup failures → preserve the commit failure and target bytes", async (t) =>
|
|
27
24
|
withTemp(async (dir) => {
|
|
@@ -51,7 +48,6 @@ test("temporary preparation and cleanup failures → preserve the commit failure
|
|
|
51
48
|
const report = reportOf(result, "write");
|
|
52
49
|
assert.equal(result.isError, true);
|
|
53
50
|
assert.equal(report?.error, "PUBLISH_FAILED");
|
|
54
|
-
assert.equal(report.stage, "commit");
|
|
55
51
|
assert.equal(report.publication, "NOT_PUBLISHED");
|
|
56
52
|
assert.deepEqual(report.cause, { code: original.code, message: original.message });
|
|
57
53
|
assert.equal(await readFile(target, "utf8"), "before\n");
|
|
@@ -62,99 +58,120 @@ test("temporary preparation and cleanup failures → preserve the commit failure
|
|
|
62
58
|
}
|
|
63
59
|
}));
|
|
64
60
|
|
|
65
|
-
test("
|
|
61
|
+
test("publication boundary and observer failures → preserve recovery and emit each diagnostic once", async (t) =>
|
|
66
62
|
withTemp(async (dir) => {
|
|
67
|
-
const
|
|
68
|
-
await
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
63
|
+
const budget = outputBudgetsFor(4096);
|
|
64
|
+
const context = await createToolContext(dir, t);
|
|
65
|
+
for (const publication of ["NOT_PUBLISHED", "PUBLISHED", "UNKNOWN"] as const) {
|
|
66
|
+
for (const progressError of [
|
|
67
|
+
undefined,
|
|
68
|
+
"display unavailable",
|
|
69
|
+
Object.assign(new Error("display unavailable " + "界".repeat(budget.fieldBytes)), {
|
|
70
|
+
code: "EIO",
|
|
71
|
+
cause: new Error("nested " + "界".repeat(budget.fieldBytes)),
|
|
72
|
+
}),
|
|
73
|
+
]) {
|
|
74
|
+
const target = join(dir, "boundary.txt");
|
|
75
|
+
await writeFile(target, "before\n");
|
|
76
|
+
const original = Object.assign(new Error("injected filesystem failure"), { code: "EIO" });
|
|
77
|
+
const nativeOpen = fs.open;
|
|
78
|
+
const nativeRename = fs.rename;
|
|
79
|
+
let published = false;
|
|
80
|
+
let commands = 0;
|
|
81
|
+
const progress: ActionFusionProgress[] = [];
|
|
82
|
+
try {
|
|
83
|
+
t.mock.method(fs, "open", async (...args: Parameters<typeof nativeOpen>) => {
|
|
84
|
+
if (
|
|
85
|
+
publication === "NOT_PUBLISHED" &&
|
|
86
|
+
String(args[0]).includes(".hashline-commit-") &&
|
|
87
|
+
args[1] === "w"
|
|
88
|
+
)
|
|
89
|
+
throw original;
|
|
90
|
+
if (publication === "PUBLISHED" && published && String(args[0]) === target)
|
|
91
|
+
throw original;
|
|
92
|
+
return nativeOpen(...args);
|
|
93
|
+
});
|
|
94
|
+
t.mock.method(fs, "rename", async (...args: Parameters<typeof nativeRename>) => {
|
|
95
|
+
if (String(args[1]) === target && publication === "UNKNOWN") throw original;
|
|
96
|
+
await nativeRename(...args);
|
|
97
|
+
published = true;
|
|
98
|
+
});
|
|
99
|
+
syncBuiltinESMExports();
|
|
100
|
+
const fusion = createActionFusionExecutor(
|
|
101
|
+
async () => {
|
|
102
|
+
commands++;
|
|
103
|
+
return { status: "succeeded", result: { content: [] } };
|
|
104
|
+
},
|
|
105
|
+
(update) => {
|
|
106
|
+
progress.push(update);
|
|
107
|
+
if (progressError !== undefined) throw progressError;
|
|
108
|
+
},
|
|
109
|
+
);
|
|
110
|
+
const result = await callTool(
|
|
111
|
+
makeWriteOverride(dir, fusion, () => budget),
|
|
112
|
+
{ path: target, mode: "overwrite", content: "after\n", then_run: { command: "check" } },
|
|
113
|
+
{ ctx: context },
|
|
114
|
+
);
|
|
115
|
+
const report = reportOf(result, "write");
|
|
116
|
+
assert.equal(result.isError, true);
|
|
117
|
+
assert.ok(report);
|
|
118
|
+
assert.equal(
|
|
119
|
+
report.error,
|
|
120
|
+
publication === "PUBLISHED" ? "POST_PROCESS_FAILED" : "PUBLISH_FAILED",
|
|
121
|
+
);
|
|
122
|
+
assert.equal(report.publication, publication);
|
|
123
|
+
assert.deepEqual(report.cause, { code: original.code, message: original.message });
|
|
124
|
+
assert.equal(report.then_run?.status, "skipped");
|
|
125
|
+
if (publication === "PUBLISHED")
|
|
126
|
+
assert.match(report.next ?? "", /change is saved; do not repeat/);
|
|
127
|
+
else if (publication === "UNKNOWN")
|
|
128
|
+
assert.match(report.next ?? "", /may or may not be saved/);
|
|
129
|
+
else assert.equal(report.next, undefined);
|
|
130
|
+
assert.equal(result.content.length, 1);
|
|
131
|
+
const block = result.content[0];
|
|
132
|
+
assert.equal(block.type, "text");
|
|
133
|
+
const diagnostic = block.text;
|
|
134
|
+
for (const once of [
|
|
135
|
+
original.message,
|
|
136
|
+
report.message,
|
|
137
|
+
'"then_run"',
|
|
138
|
+
'"status": "skipped"',
|
|
139
|
+
])
|
|
140
|
+
assert.equal(diagnostic.split(once).length - 1, 1);
|
|
141
|
+
assert.equal(commands, 0);
|
|
142
|
+
assert.deepEqual(
|
|
143
|
+
progress.map((update) => update.command),
|
|
144
|
+
["waiting", "skipped"],
|
|
145
|
+
);
|
|
146
|
+
assert.ok(progress.every((update) => !update.mutationCompleted));
|
|
147
|
+
if (typeof progressError === "string") {
|
|
148
|
+
assert.deepEqual(report.progressError, { message: progressError });
|
|
149
|
+
} else if (progressError) {
|
|
150
|
+
assert.equal(report.progressError?.code, "EIO");
|
|
151
|
+
assert.ok(report.progressError.message.startsWith("display unavailable"));
|
|
152
|
+
assert.ok(Buffer.byteLength(report.progressError.message) <= budget.fieldBytes);
|
|
153
|
+
assert.notEqual(report.progressError.message, progressError.message);
|
|
154
|
+
assert.ok(report.progressError.cause);
|
|
155
|
+
assert.ok(report.progressError.cause.message.startsWith("nested"));
|
|
156
|
+
assert.ok(Buffer.byteLength(report.progressError.cause.message) <= budget.fieldBytes);
|
|
157
|
+
assert.notEqual(report.progressError.cause.message, progressError.cause.message);
|
|
158
|
+
} else assert.equal(report.progressError, undefined);
|
|
159
|
+
} finally {
|
|
160
|
+
t.mock.restoreAll();
|
|
161
|
+
syncBuiltinESMExports();
|
|
162
|
+
}
|
|
163
|
+
assert.equal(
|
|
164
|
+
await readFile(target, "utf8"),
|
|
165
|
+
publication === "PUBLISHED" ? "after\n" : "before\n",
|
|
166
|
+
);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
151
169
|
}));
|
|
152
170
|
|
|
153
171
|
test("cancellation after publication → does not rerun mutation and still inspects freshness", async (t) =>
|
|
154
172
|
withTemp(async (dir) => {
|
|
155
173
|
for (const state of ["changed", "missing"] as const) {
|
|
156
174
|
const target = join(dir, `${state}.txt`);
|
|
157
|
-
let mutations = 0;
|
|
158
175
|
const controller = new AbortController();
|
|
159
176
|
const fusion = createActionFusionExecutor(async () => {
|
|
160
177
|
if (state === "changed") await writeFile(target, "command changed\n");
|
|
@@ -162,26 +179,15 @@ test("cancellation after publication → does not rerun mutation and still inspe
|
|
|
162
179
|
controller.abort();
|
|
163
180
|
throw new Error("timed out");
|
|
164
181
|
});
|
|
165
|
-
const
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
thenRun: { command: "check" },
|
|
172
|
-
mutate: async () => {
|
|
173
|
-
mutations++;
|
|
174
|
-
await writeFile(target, "mutation\n");
|
|
175
|
-
return mutation("mutation\n");
|
|
176
|
-
},
|
|
177
|
-
signal: controller.signal,
|
|
178
|
-
ctx: await createToolContext(dir, t),
|
|
179
|
-
});
|
|
180
|
-
const report = reportOf(outcome, "edit");
|
|
182
|
+
const result = await callTool(
|
|
183
|
+
makeWriteOverride(dir, fusion),
|
|
184
|
+
{ path: target, mode: "create", content: "mutation\n", then_run: { command: "check" } },
|
|
185
|
+
{ signal: controller.signal, ctx: await createToolContext(dir, t) },
|
|
186
|
+
);
|
|
187
|
+
const report = reportOf(result, "write");
|
|
181
188
|
assert.equal(report?.publication, "PUBLISHED");
|
|
182
189
|
assert.equal(report?.then_run?.status, "cancelled");
|
|
183
190
|
assert.equal(report?.freshness, state);
|
|
184
|
-
assert.equal(mutations, 1);
|
|
185
191
|
if (state === "changed") assert.equal(await readFile(target, "utf8"), "command changed\n");
|
|
186
192
|
else await assert.rejects(readFile(target), { code: "ENOENT" });
|
|
187
193
|
}
|
|
@@ -198,22 +204,18 @@ test("first command fails → releases the queue for the next mutation", async (
|
|
|
198
204
|
return { status: "succeeded", result: { content: [{ type: "text", text: "ok" }] } };
|
|
199
205
|
});
|
|
200
206
|
for (const content of ["first\n", "second\n"]) {
|
|
201
|
-
const result = await
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
mutate: async () => {
|
|
209
|
-
await writeFile(target, content);
|
|
210
|
-
return mutation(content);
|
|
207
|
+
const result = await callTool(
|
|
208
|
+
makeWriteOverride(dir, fusion),
|
|
209
|
+
{
|
|
210
|
+
path: target,
|
|
211
|
+
content,
|
|
212
|
+
mode: calls === 0 ? "create" : "overwrite",
|
|
213
|
+
then_run: { command: "check" },
|
|
211
214
|
},
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
});
|
|
215
|
+
{ toolCallId: content, ctx },
|
|
216
|
+
);
|
|
215
217
|
assert.equal(
|
|
216
|
-
reportOf(result, "
|
|
218
|
+
reportOf(result, "write")?.then_run?.status,
|
|
217
219
|
calls === 1 ? "failed" : "succeeded",
|
|
218
220
|
);
|
|
219
221
|
}
|
|
@@ -232,26 +234,51 @@ test("command succeeds on an unchanged target → retains the result and complet
|
|
|
232
234
|
}),
|
|
233
235
|
(event) => progress.push(event),
|
|
234
236
|
);
|
|
235
|
-
const completed = await
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
absolutePath: target,
|
|
241
|
-
thenRun: { command: "check" },
|
|
242
|
-
signal: undefined,
|
|
243
|
-
ctx: await createToolContext(dir, t),
|
|
244
|
-
mutate: async () => {
|
|
245
|
-
await writeFile(target, "saved\n");
|
|
246
|
-
return mutation("saved\n");
|
|
247
|
-
},
|
|
248
|
-
});
|
|
237
|
+
const completed = await callTool(
|
|
238
|
+
makeWriteOverride(dir, fusion),
|
|
239
|
+
{ path: target, content: "saved\n", mode: "create", then_run: { command: "check" } },
|
|
240
|
+
{ ctx: await createToolContext(dir, t) },
|
|
241
|
+
);
|
|
249
242
|
assert.equal(completed.content.length, 1);
|
|
250
|
-
assert.equal(reportOf(completed, "
|
|
251
|
-
assert.equal(reportOf(completed, "
|
|
243
|
+
assert.equal(reportOf(completed, "write")?.then_run?.status, "succeeded");
|
|
244
|
+
assert.equal(reportOf(completed, "write")?.then_run?.output, "command finished");
|
|
252
245
|
assert.equal(progress.filter((event) => event.command === "succeeded").length, 1);
|
|
253
246
|
assert.equal(progress.at(-1)?.freshness, "unchanged");
|
|
254
247
|
assert.deepEqual(progress.at(-1)?.result, {
|
|
255
248
|
content: [{ type: "text", text: "command finished" }],
|
|
256
249
|
});
|
|
257
250
|
}));
|
|
251
|
+
|
|
252
|
+
test("cancellation before mutation → reports a cancelled command without publishing", async (t) =>
|
|
253
|
+
withTemp(async (dir) => {
|
|
254
|
+
const target = join(dir, "cancelled.txt");
|
|
255
|
+
await writeFile(target, "before\n");
|
|
256
|
+
const controller = new AbortController();
|
|
257
|
+
controller.abort();
|
|
258
|
+
let commands = 0;
|
|
259
|
+
const progress: ActionFusionProgress[] = [];
|
|
260
|
+
const fusion = createActionFusionExecutor(
|
|
261
|
+
async () => {
|
|
262
|
+
commands++;
|
|
263
|
+
return { status: "succeeded", result: { content: [] } };
|
|
264
|
+
},
|
|
265
|
+
(event) => progress.push(event),
|
|
266
|
+
);
|
|
267
|
+
const result = await callTool(
|
|
268
|
+
makeWriteOverride(dir, fusion),
|
|
269
|
+
{ path: target, mode: "overwrite", content: "after\n", then_run: { command: "check" } },
|
|
270
|
+
{ signal: controller.signal, ctx: await createToolContext(dir, t) },
|
|
271
|
+
);
|
|
272
|
+
const report = reportOf(result, "write");
|
|
273
|
+
assert.equal(result.isError, true);
|
|
274
|
+
assert.equal(report?.error, "OPERATION_ABORTED");
|
|
275
|
+
assert.equal(report?.publication, "NOT_PUBLISHED");
|
|
276
|
+
assert.equal(report?.then_run?.status, "cancelled");
|
|
277
|
+
assert.deepEqual(
|
|
278
|
+
progress.map((event) => event.command),
|
|
279
|
+
["waiting", "cancelled"],
|
|
280
|
+
);
|
|
281
|
+
assert.ok(progress.every((event) => !event.mutationCompleted));
|
|
282
|
+
assert.equal(commands, 0);
|
|
283
|
+
assert.equal(await readFile(target, "utf8"), "before\n");
|
|
284
|
+
}));
|