@@ -184,21 +184,23 @@ suite('DeepnoteNotebookManager', () => {
184184 } ) ;
185185
186186 suite ( 'updateProjectIntegrations' , ( ) => {
187- test ( 'should update integrations list for existing project' , ( ) => {
187+ test ( 'should update integrations list for existing project and return true ' , ( ) => {
188188 manager . storeOriginalProject ( 'project-123' , mockProject , 'notebook-456' ) ;
189189
190190 const integrations = [
191191 { id : 'int-1' , name : 'PostgreSQL' , type : 'pgsql' } ,
192192 { id : 'int-2' , name : 'BigQuery' , type : 'big-query' }
193193 ] ;
194194
195- manager . updateProjectIntegrations ( 'project-123' , integrations ) ;
195+ const result = manager . updateProjectIntegrations ( 'project-123' , integrations ) ;
196+
197+ assert . strictEqual ( result , true ) ;
196198
197199 const updatedProject = manager . getOriginalProject ( 'project-123' ) ;
198200 assert . deepStrictEqual ( updatedProject ?. project . integrations , integrations ) ;
199201 } ) ;
200202
201- test ( 'should replace existing integrations list' , ( ) => {
203+ test ( 'should replace existing integrations list and return true ' , ( ) => {
202204 const projectWithIntegrations : DeepnoteProject = {
203205 ...mockProject ,
204206 project : {
@@ -214,13 +216,15 @@ suite('DeepnoteNotebookManager', () => {
214216 { id : 'new-int-2' , name : 'New Integration 2' , type : 'big-query' }
215217 ] ;
216218
217- manager . updateProjectIntegrations ( 'project-123' , newIntegrations ) ;
219+ const result = manager . updateProjectIntegrations ( 'project-123' , newIntegrations ) ;
220+
221+ assert . strictEqual ( result , true ) ;
218222
219223 const updatedProject = manager . getOriginalProject ( 'project-123' ) ;
220224 assert . deepStrictEqual ( updatedProject ?. project . integrations , newIntegrations ) ;
221225 } ) ;
222226
223- test ( 'should handle empty integrations array' , ( ) => {
227+ test ( 'should handle empty integrations array and return true ' , ( ) => {
224228 const projectWithIntegrations : DeepnoteProject = {
225229 ...mockProject ,
226230 project : {
@@ -231,26 +235,33 @@ suite('DeepnoteNotebookManager', () => {
231235
232236 manager . storeOriginalProject ( 'project-123' , projectWithIntegrations , 'notebook-456' ) ;
233237
234- manager . updateProjectIntegrations ( 'project-123' , [ ] ) ;
238+ const result = manager . updateProjectIntegrations ( 'project-123' , [ ] ) ;
239+
240+ assert . strictEqual ( result , true ) ;
235241
236242 const updatedProject = manager . getOriginalProject ( 'project-123' ) ;
237243 assert . deepStrictEqual ( updatedProject ?. project . integrations , [ ] ) ;
238244 } ) ;
239245
240- test ( 'should do nothing for unknown project' , ( ) => {
241- // Should not throw an error
242- manager . updateProjectIntegrations ( 'unknown-project' , [ { id : 'int-1' , name : 'Integration' , type : 'pgsql' } ] ) ;
246+ test ( 'should return false for unknown project' , ( ) => {
247+ const result = manager . updateProjectIntegrations ( 'unknown-project' , [
248+ { id : 'int-1' , name : 'Integration' , type : 'pgsql' }
249+ ] ) ;
250+
251+ assert . strictEqual ( result , false ) ;
243252
244253 const project = manager . getOriginalProject ( 'unknown-project' ) ;
245254 assert . strictEqual ( project , undefined ) ;
246255 } ) ;
247256
248- test ( 'should preserve other project properties' , ( ) => {
257+ test ( 'should preserve other project properties and return true ' , ( ) => {
249258 manager . storeOriginalProject ( 'project-123' , mockProject , 'notebook-456' ) ;
250259
251260 const integrations = [ { id : 'int-1' , name : 'PostgreSQL' , type : 'pgsql' } ] ;
252261
253- manager . updateProjectIntegrations ( 'project-123' , integrations ) ;
262+ const result = manager . updateProjectIntegrations ( 'project-123' , integrations ) ;
263+
264+ assert . strictEqual ( result , true ) ;
254265
255266 const updatedProject = manager . getOriginalProject ( 'project-123' ) ;
256267 assert . strictEqual ( updatedProject ?. project . id , mockProject . project . id ) ;
0 commit comments