Skip to content

Commit b1ab5a0

Browse files
committed
feat: add test for custom error message on unimplemented feature group
1 parent 80a6dcf commit b1ab5a0

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

packages/mcp-server-supabase/src/server.test.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2276,6 +2276,28 @@ describe('feature groups', () => {
22762276
'execute_sql',
22772277
]);
22782278
});
2279+
2280+
test('unimplemented feature group produces custom error message', async () => {
2281+
const platform: SupabasePlatform = {
2282+
database: {
2283+
executeSql() {
2284+
throw new Error('Not implemented');
2285+
},
2286+
listMigrations() {
2287+
throw new Error('Not implemented');
2288+
},
2289+
applyMigration() {
2290+
throw new Error('Not implemented');
2291+
},
2292+
},
2293+
};
2294+
2295+
const setupPromise = setup({ platform, features: ['account'] });
2296+
2297+
await expect(setupPromise).rejects.toThrow(
2298+
"This platform does not support the 'account' feature group"
2299+
);
2300+
});
22792301
});
22802302

22812303
describe('project scoped tools', () => {

0 commit comments

Comments
 (0)