Skip to content

Commit

Permalink
fix: fix test for relation
Browse files Browse the repository at this point in the history
  • Loading branch information
ozum committed Feb 27, 2021
1 parent 54872a7 commit d666b96
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/pg-structure/relation/m2m-relation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export default class M2MRelation extends Relation {
/**
* Whether the relation targets to many. Since, many to many relations targets many, this is `true`.
*/
public readonly toMany = true;
public readonly toMany: boolean = true;

/**
* Suggested name for {@link Relation relation}.
Expand Down
2 changes: 1 addition & 1 deletion src/pg-structure/relation/m2o-relation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default class M2ORelation extends Relation {
/**
* Whether the relation targets to many. Since, many to one relations targets single, this is `true`.
*/
public readonly toMany = false;
public readonly toMany: boolean = false;

/**
* Suggested name for {@link Relation relation}.
Expand Down
2 changes: 1 addition & 1 deletion src/pg-structure/relation/o2m-relation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default class O2MRelation extends Relation {
/**
* Whether the relation targets to many. Since, one to many relations targets many, this is `true`.
*/
public readonly toMany = true;
public readonly toMany: boolean = true;

/**
* Suggested name for {@link Relation relation}.
Expand Down
6 changes: 3 additions & 3 deletions test/base/relation.test.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { Db, M2ORelation, O2MRelation, Table } from "../../src/index";
import { Db, O2MRelation, Table } from "../../src/index";
import getDb from "../test-helper/get-db";

let db: Db;
let o2mRelation: M2ORelation;
let o2mRelation: O2MRelation;

beforeAll(async () => {
db = await getDb();
o2mRelation = db.tables.get("account").o2mRelations.get("primary_contacts") as O2MRelation;
o2mRelation = db.tables.get("account").o2mRelations.get("primary_contacts");
});

describe("constraint", () => {
Expand Down

0 comments on commit d666b96

Please sign in to comment.