Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions packages/spec/src/driver/driver.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,11 @@ describe('DriverInterfaceSchema', () => {
checkHealth: async () => true,
execute: async () => ({}),
find: async () => [],
findStream: async function* () {},
findOne: async () => null,
create: async () => ({}),
update: async () => ({}),
upsert: async () => ({}),
delete: async () => true,
count: async () => 0,
bulkCreate: async () => [],
Expand Down Expand Up @@ -118,9 +120,11 @@ describe('DriverInterfaceSchema', () => {
checkHealth: async () => true,
execute: async () => ({}),
find: async (object: string, query: any) => [],
findStream: async function* (object: string, query: any) {},
findOne: async (object: string, query: any) => null,
create: async (object: string, data: any) => data,
update: async (object: string, id: any, data: any) => data,
upsert: async (object: string, data: any) => data,
delete: async (object: string, id: any) => true,
count: async () => 0,
bulkCreate: async (object: string, data: any[]) => data,
Expand Down Expand Up @@ -222,9 +226,11 @@ describe('DriverInterfaceSchema', () => {
checkHealth: async () => true,
execute: async () => ({}),
find: async () => [],
findStream: async function* () {},
findOne: async () => null,
create: async () => ({}),
update: async () => ({}),
upsert: async () => ({}),
delete: async () => true,
count: async () => 0,
bulkCreate: async () => [],
Expand Down Expand Up @@ -301,9 +307,11 @@ describe('DriverInterfaceSchema', () => {
checkHealth: async () => true,
execute: async () => ({}),
find: async () => [],
findStream: async function* () {},
findOne: async () => null,
create: async () => ({}),
update: async () => ({}),
upsert: async () => ({}),
delete: async () => true,
count: async () => 0,
bulkCreate: async () => [],
Expand Down Expand Up @@ -363,9 +371,11 @@ describe('DriverInterfaceSchema', () => {
checkHealth: async () => true,
execute: async () => ({}),
find: async () => [],
findStream: async function* () {},
findOne: async () => null,
create: async () => ({}),
update: async () => ({}),
upsert: async () => ({}),
delete: async () => true,
count: async () => 0,
bulkCreate: async () => [],
Expand Down Expand Up @@ -403,9 +413,11 @@ describe('DriverInterfaceSchema', () => {
checkHealth: async () => true,
execute: async () => ({}),
find: async () => [],
findStream: async function* () {},
findOne: async () => null,
create: async () => ({}),
update: async () => ({}),
upsert: async () => ({}),
delete: async () => true,
count: async () => 0,
bulkCreate: async () => [],
Expand Down Expand Up @@ -445,9 +457,11 @@ describe('DriverInterfaceSchema', () => {
checkHealth: async () => true,
execute: async () => ({}),
find: async (object, query) => [],
findStream: async function* (object, query) {},
findOne: async (object, query) => null,
create: async (object, data) => data,
update: async (object, id, data) => data,
upsert: async (object, data) => data,
delete: async (object, id) => true,
count: async () => 0,
bulkCreate: async (object, data) => data,
Expand Down Expand Up @@ -485,9 +499,11 @@ describe('DriverInterfaceSchema', () => {
checkHealth: async () => true,
execute: async () => ({}),
find: async (object, query) => [],
findStream: async function* (object, query) {},
findOne: async (object, query) => null,
create: async (object, data) => data,
update: async (object, id, data) => data,
upsert: async (object, data) => data,
delete: async (object, id) => true,
count: async () => 0,
bulkCreate: async (object, data) => data,
Expand Down Expand Up @@ -525,9 +541,11 @@ describe('DriverInterfaceSchema', () => {
checkHealth: async () => true,
execute: async () => ({}),
find: async (object, query) => [],
findStream: async function* (object, query) {},
findOne: async (object, query) => null,
create: async (object, data) => data,
update: async (object, id, data) => data,
upsert: async (object, data) => data,
delete: async (object, id) => true,
count: async () => 0,
bulkCreate: async (object, data) => data,
Expand Down Expand Up @@ -565,9 +583,11 @@ describe('DriverInterfaceSchema', () => {
checkHealth: async () => true,
execute: async () => ({}),
find: async (object, query) => [],
findStream: async function* (object, query) {},
findOne: async (object, query) => null,
create: async (object, data) => data,
update: async (object, id, data) => data,
upsert: async (object, data) => data,
delete: async (object, id) => true,
count: async () => 0,
bulkCreate: async (object, data) => data,
Expand Down Expand Up @@ -605,9 +625,11 @@ describe('DriverInterfaceSchema', () => {
checkHealth: async () => true,
execute: async () => ({}),
find: async (object, query) => [],
findStream: async function* (object, query) {},
findOne: async (object, query) => null,
create: async (object, data) => data,
update: async (object, id, data) => data,
upsert: async (object, data) => data,
delete: async (object, id) => true,
count: async () => 0,
bulkCreate: async (object, data) => data,
Expand Down
21 changes: 21 additions & 0 deletions packages/spec/src/kernel/plugin.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ describe('PluginContextSchema', () => {
post: () => {},
use: () => {}
}
},
drivers: {
register: () => {}
}
};

Expand Down Expand Up @@ -81,6 +84,9 @@ describe('PluginContextSchema', () => {
post: () => {},
use: () => {}
}
},
drivers: {
register: () => {}
}
};

Expand Down Expand Up @@ -130,6 +136,9 @@ describe('PluginContextSchema', () => {
post: (path: string, handler: Function) => {},
use: (pathOrHandler: string | Function, handler?: Function) => {}
}
},
drivers: {
register: (driver: any) => {}
}
};

Expand Down Expand Up @@ -320,6 +329,9 @@ describe('Plugin Lifecycle Scenarios', () => {
post: () => {},
use: () => {}
}
},
drivers: {
register: () => {}
}
} as any);
}
Expand Down Expand Up @@ -377,6 +389,9 @@ describe('Plugin Lifecycle Scenarios', () => {
post: () => {},
use: () => {}
}
},
drivers: {
register: () => {}
}
} as any;

Expand Down Expand Up @@ -444,6 +459,9 @@ describe('Plugin Lifecycle Scenarios', () => {
post: () => {},
use: () => {}
}
},
drivers: {
register: () => {}
}
} as any,
'1.0.0',
Expand Down Expand Up @@ -503,6 +521,9 @@ describe('Plugin Lifecycle Scenarios', () => {
post: () => {},
use: () => {}
}
},
drivers: {
register: () => {}
}
} as any);
}
Expand Down
Loading
Loading