Skip to content

Commit 025f5d4

Browse files
Copilotaarne
andcommitted
test: tighten diagnostics and execution tree assertions
Co-authored-by: aarne <82001+aarne@users.noreply.github.com>
1 parent 16f8f31 commit 025f5d4

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

packages/bridge-core/test/execution-tree.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ describe("ExecutionTree edge cases", () => {
4848
tree.logger = { warn: (msg: string) => (warning = msg) };
4949

5050
assert.equal((tree as any).applyPath([{ x: 1 }], ref(["x"])), undefined);
51+
assert.equal((tree as any).applyPath([{ x: 1 }], ref(["0", "x"])), 1);
5152
assert.match(warning, /Accessing "\.x" on an array/);
5253
});
5354
});

packages/bridge/test/bridge-format.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1289,8 +1289,8 @@ describe("parser diagnostics and serializer edge cases", () => {
12891289
const result = parseBridgeDiagnostics("version 1.5\nbridge Query.x {\n with output as o\n o.x = \"ok\"\n}\n§");
12901290
assert.ok(result.diagnostics.length > 0);
12911291
assert.equal(result.diagnostics[0]?.severity, "error");
1292-
assert.ok(result.diagnostics[0]?.range.start.line != null);
1293-
assert.ok(result.diagnostics[0]?.range.start.character != null);
1292+
assert.equal(result.diagnostics[0]?.range.start.line, 5);
1293+
assert.equal(result.diagnostics[0]?.range.start.character, 0);
12941294
});
12951295

12961296
test("reserved source identifier is rejected as const name", () => {

0 commit comments

Comments
 (0)