fix: test fix to normalized coordinate space.
This commit is contained in:
+7
-7
@@ -19,13 +19,13 @@ test("adapter accepts tool calls and rejects truncated responses", async (t) =>
|
||||
await assert.rejects(complete(config, [], []), /incomplete/);
|
||||
});
|
||||
|
||||
test("tool descriptions do not inject coordinate normalization or pixel prompting", () => {
|
||||
for (const space of ["pixels", "normalized_1000"] as const) {
|
||||
const description = toolsForCoordinates(space)[0]?.function.description ?? "";
|
||||
assert.doesNotMatch(description, /normalized/i);
|
||||
assert.doesNotMatch(description, /pixel/i);
|
||||
assert.doesNotMatch(description, /0\.\.1000/);
|
||||
}
|
||||
test("tool descriptions advertise coordinate conventions", () => {
|
||||
const normalized = toolsForCoordinates("normalized_1000")[0]?.function.description ?? "";
|
||||
assert.match(normalized, /Coordinates must be normalized integers in the range \[0, 1000\], where \(0, 0\) is top-left and \(1000, 1000\) is bottom-right\./);
|
||||
|
||||
const pixels = toolsForCoordinates("pixels")[0]?.function.description ?? "";
|
||||
assert.match(pixels, /Click coordinates are screenshot pixels, not normalized coordinates\./);
|
||||
assert.doesNotMatch(pixels, /normalized integers in the range/);
|
||||
});
|
||||
|
||||
test("tool inputs reject invalid commands, bounds, and action names", () => {
|
||||
|
||||
Reference in New Issue
Block a user