Skip to content

Commit 4510692

Browse files
Copilothotlong
andcommitted
Fix test files to match updated schemas
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent dc84c7a commit 4510692

3 files changed

Lines changed: 178 additions & 51 deletions

File tree

packages/spec/src/driver/driver.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,11 @@ describe('DriverInterfaceSchema', () => {
7777
checkHealth: async () => true,
7878
execute: async () => ({}),
7979
find: async () => [],
80+
findStream: async function* () {},
8081
findOne: async () => null,
8182
create: async () => ({}),
8283
update: async () => ({}),
84+
upsert: async () => ({}),
8385
delete: async () => true,
8486
count: async () => 0,
8587
bulkCreate: async () => [],
@@ -118,9 +120,11 @@ describe('DriverInterfaceSchema', () => {
118120
checkHealth: async () => true,
119121
execute: async () => ({}),
120122
find: async (object: string, query: any) => [],
123+
findStream: async function* (object: string, query: any) {},
121124
findOne: async (object: string, query: any) => null,
122125
create: async (object: string, data: any) => data,
123126
update: async (object: string, id: any, data: any) => data,
127+
upsert: async (object: string, data: any) => data,
124128
delete: async (object: string, id: any) => true,
125129
count: async () => 0,
126130
bulkCreate: async (object: string, data: any[]) => data,
@@ -222,9 +226,11 @@ describe('DriverInterfaceSchema', () => {
222226
checkHealth: async () => true,
223227
execute: async () => ({}),
224228
find: async () => [],
229+
findStream: async function* () {},
225230
findOne: async () => null,
226231
create: async () => ({}),
227232
update: async () => ({}),
233+
upsert: async () => ({}),
228234
delete: async () => true,
229235
count: async () => 0,
230236
bulkCreate: async () => [],
@@ -301,9 +307,11 @@ describe('DriverInterfaceSchema', () => {
301307
checkHealth: async () => true,
302308
execute: async () => ({}),
303309
find: async () => [],
310+
findStream: async function* () {},
304311
findOne: async () => null,
305312
create: async () => ({}),
306313
update: async () => ({}),
314+
upsert: async () => ({}),
307315
delete: async () => true,
308316
count: async () => 0,
309317
bulkCreate: async () => [],

packages/spec/src/kernel/plugin.test.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,9 @@ describe('Plugin Lifecycle Scenarios', () => {
320320
post: () => {},
321321
use: () => {}
322322
}
323+
},
324+
drivers: {
325+
register: () => {}
323326
}
324327
} as any);
325328
}
@@ -377,6 +380,9 @@ describe('Plugin Lifecycle Scenarios', () => {
377380
post: () => {},
378381
use: () => {}
379382
}
383+
},
384+
drivers: {
385+
register: () => {}
380386
}
381387
} as any;
382388

@@ -444,6 +450,9 @@ describe('Plugin Lifecycle Scenarios', () => {
444450
post: () => {},
445451
use: () => {}
446452
}
453+
},
454+
drivers: {
455+
register: () => {}
447456
}
448457
} as any,
449458
'1.0.0',
@@ -503,6 +512,9 @@ describe('Plugin Lifecycle Scenarios', () => {
503512
post: () => {},
504513
use: () => {}
505514
}
515+
},
516+
drivers: {
517+
register: () => {}
506518
}
507519
} as any);
508520
}

0 commit comments

Comments
 (0)