Skip to content

Commit

Permalink
Added code comment
Browse files Browse the repository at this point in the history
  • Loading branch information
leo committed Feb 25, 2025
1 parent 5e57edb commit 577780f
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions tests/types.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,9 @@ test('get all records of all models with model-specific instructions', async ()
on: {
teams: {
limitedTo: 10,
// It is important to test an instruction here that is not already present
// in the global instructions, to make sure it is working correctly.
selecting: ['id'],
},
},
},
Expand All @@ -415,7 +418,7 @@ test('get all records of all models with model-specific instructions', async ()
returning: true,
},
{
statement: `SELECT "id", "ronin.createdAt", "ronin.createdBy", "ronin.updatedAt", "ronin.updatedBy" FROM "teams" ORDER BY "ronin.createdAt" DESC LIMIT 11`,
statement: `SELECT "id" FROM "teams" ORDER BY "ronin.createdAt" DESC LIMIT 11`,
params: [],
returning: true,
},
Expand Down Expand Up @@ -446,12 +449,6 @@ test('get all records of all models with model-specific instructions', async ()
teams: {
records: new Array(2).fill({
id: expect.stringMatching(RECORD_ID_REGEX),
ronin: {
createdAt: expect.stringMatching(RECORD_TIMESTAMP_REGEX),
createdBy: null,
updatedAt: expect.stringMatching(RECORD_TIMESTAMP_REGEX),
updatedBy: null,
},
}),
modelFields: expect.objectContaining({
id: 'string',
Expand Down

0 comments on commit 577780f

Please sign in to comment.