Skip to content

Commit 0806695

Browse files
committed
test: restore join test for repository functionality
1 parent 9b668f1 commit 0806695

File tree

2 files changed

+39
-39
lines changed

2 files changed

+39
-39
lines changed

__tests__/repository/join.test.ts

Lines changed: 0 additions & 39 deletions
This file was deleted.

__tests__/repository/join.test.ts.txt

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// import {and, eq, Join, like, Repository} from "../../src";
2+
// import {cleanupTestData, DomainPost, DomainUser, executor, seedTestData, setupTestTables,} from "../../test-setup";
3+
//
4+
// describe("Repository count", () => {
5+
// let repository: Repository<DomainPost>;
6+
//
7+
// beforeAll(async () => {
8+
// await setupTestTables();
9+
// await seedTestData()
10+
// repository = new Repository("posts", executor);
11+
// });
12+
//
13+
// afterAll(async () => {
14+
// // await cleanupTestData();
15+
// });
16+
//
17+
// it("should count all rows without condition", async () => {
18+
// const result = await repository.findRows({
19+
// joins: [
20+
// {
21+
// table: 'users',
22+
// as: 'author',
23+
// type: 'left',
24+
// on: {
25+
// localField: 'author_id',
26+
// foreignField: 'id'
27+
// },
28+
// columns: ['id', 'name']
29+
// } as Join<DomainPost, DomainUser>
30+
// ]
31+
// })
32+
//
33+
// console.log(JSON.stringify(result, null, 2));
34+
//
35+
//
36+
// expect(1).toBe(1);
37+
// });
38+
//
39+
// });

0 commit comments

Comments
 (0)