Skip to content

Commit 1647ee0

Browse files
fix(tests): address claude bot review comments
- Rename misleading operator-collision test: the assertion proves the rewriter DOES rewrite operator-named map keys, so the test name must not say "does not rewrite operators". - Drop the `null as unknown as string` cast — `transformOptions`'s generic accepts the wider type directly.
1 parent 1b0907a commit 1647ee0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/unit/utils/transform.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ describe('rewriteODataIdentifiers', () => {
6969
).toBe("processNameSuffix eq 'X'");
7070
});
7171

72-
it('does not rewrite operators that happen to overlap map keys', () => {
72+
it('rewrites tokens that overlap OData operators when present in the map (caller must avoid key collisions)', () => {
7373
// Map contains identifier `eq` (pathological — operator collision).
7474
// Demonstrates that token replacement is purely lookup-based: callers
7575
// are expected to keep their field maps free of operator collisions.
@@ -143,7 +143,7 @@ describe('transformOptions', () => {
143143

144144
it('ignores non-string values on OData keys', () => {
145145
const out = transformOptions(
146-
{ filter: undefined, orderby: null as unknown as string },
146+
{ filter: undefined, orderby: null },
147147
responseMap,
148148
);
149149
expect(out).toEqual({ filter: undefined, orderby: null });

0 commit comments

Comments
 (0)