Skip to content

Commit 50bc8ea

Browse files
Copilothotlong
andcommitted
Add descriptions to ts-expect-error directives and fix config import
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 047f13a commit 50bc8ea

3 files changed

Lines changed: 12 additions & 10 deletions

File tree

examples/msw-object-form/src/mocks/browser.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { ObjectKernel, DriverPlugin, AppPlugin } from '@objectstack/runtime';
99
import { ObjectQLPlugin } from '@objectstack/objectql';
1010
import { InMemoryDriver } from '@objectstack/driver-memory';
1111
import { MSWPlugin } from '@objectstack/plugin-msw';
12+
// @ts-expect-error - Config file not in src directory
1213
import appConfig from '../../objectstack.config';
1314

1415
let kernel: ObjectKernel | null = null;

examples/msw-object-form/src/mocks/server.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { ObjectQLPlugin } from '@objectstack/objectql';
1010
import { InMemoryDriver } from '@objectstack/driver-memory';
1111
import { setupServer } from 'msw/node';
1212
import { http, HttpResponse } from 'msw';
13+
// @ts-expect-error - Config file not in src directory
1314
import appConfig from '../../objectstack.config';
1415

1516
let kernel: ObjectKernel | null = null;

packages/core/src/query/__tests__/window-functions.test.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ describe('QueryASTBuilder - Window Functions', () => {
6161
],
6262
};
6363

64-
// @ts-expect-error
64+
// @ts-expect-error - testing private method
6565
const result: WindowNode = builder.buildWindow(config);
6666

6767
expect(result).toMatchObject({
@@ -85,7 +85,7 @@ describe('QueryASTBuilder - Window Functions', () => {
8585
defaultValue: 0,
8686
};
8787

88-
// @ts-expect-error
88+
// @ts-expect-error - testing private method
8989
const result: WindowNode = builder.buildWindow(config);
9090

9191
expect(result).toMatchObject({
@@ -116,7 +116,7 @@ describe('QueryASTBuilder - Window Functions', () => {
116116
offset: 1,
117117
};
118118

119-
// @ts-expect-error
119+
// @ts-expect-error - testing private method
120120
const result: WindowNode = builder.buildWindow(config);
121121

122122
expect(result).toMatchObject({
@@ -140,7 +140,7 @@ describe('QueryASTBuilder - Window Functions', () => {
140140
},
141141
};
142142

143-
// @ts-expect-error
143+
// @ts-expect-error - testing private method
144144
const result: WindowNode = builder.buildWindow(sumConfig);
145145

146146
expect(result).toMatchObject({
@@ -170,7 +170,7 @@ describe('QueryASTBuilder - Window Functions', () => {
170170
orderBy: [{ field: 'created_at', direction: 'asc' as const }],
171171
};
172172

173-
// @ts-expect-error
173+
// @ts-expect-error - testing private method
174174
const result: WindowNode = builder.buildWindow(config);
175175

176176
expect(result).toMatchObject({
@@ -189,7 +189,7 @@ describe('QueryASTBuilder - Window Functions', () => {
189189
orderBy: [{ field: 'updated_at', direction: 'desc' as const }],
190190
};
191191

192-
// @ts-expect-error
192+
// @ts-expect-error - testing private method
193193
const result: WindowNode = builder.buildWindow(config);
194194

195195
expect(result).toMatchObject({
@@ -206,7 +206,7 @@ describe('QueryASTBuilder - Window Functions', () => {
206206
orderBy: [{ field: 'created_at', direction: 'asc' as const }],
207207
};
208208

209-
// @ts-expect-error
209+
// @ts-expect-error - testing private method
210210
const result: WindowNode = builder.buildWindow(config);
211211

212212
expect(result.partitionBy).toBeUndefined();
@@ -226,7 +226,7 @@ describe('QueryASTBuilder - Window Functions', () => {
226226
},
227227
};
228228

229-
// @ts-expect-error
229+
// @ts-expect-error - testing private method
230230
const result: WindowNode = builder.buildWindow(config);
231231

232232
expect(result.frame).toEqual({
@@ -244,7 +244,7 @@ describe('QueryASTBuilder - Window Functions', () => {
244244
orderBy: [{ field: 'score', direction: 'desc' as const }],
245245
};
246246

247-
// @ts-expect-error
247+
// @ts-expect-error - testing private method
248248
const result: WindowNode = builder.buildWindow(config);
249249

250250
expect(result).toMatchObject({
@@ -262,7 +262,7 @@ describe('QueryASTBuilder - Window Functions', () => {
262262
orderBy: [{ field: 'exam_score', direction: 'desc' as const }],
263263
};
264264

265-
// @ts-expect-error
265+
// @ts-expect-error - testing private method
266266
const result: WindowNode = builder.buildWindow(config);
267267

268268
expect(result).toMatchObject({

0 commit comments

Comments
 (0)