Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
narthur committed Apr 17, 2024
1 parent 079f30c commit d58e3b6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/codegen/makeGetter.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ import { makeGetter } from "./makeGetter";
import { FieldDefinition } from "..";

function run(field: Partial<FieldDefinition> = {}): string {
return makeGetter(f(field), []);
return makeGetter(f(field), [
{
id: 1,
name: "table_name",
fields: [],
},
]);
}

describe("makeGetter", () => {
Expand Down Expand Up @@ -90,7 +96,7 @@ describe("makeGetter", () => {
link_row_table_id: 1,
link_row_related_field_id: 2,
},
"this.repository.getMany<",
"this.getLinkedRows",
],
])("%s => `%s`", (field, expected) => {
expect(run(field)).toContain(expected);
Expand Down

0 comments on commit d58e3b6

Please sign in to comment.