@@ -35,7 +35,7 @@ describe('DatasourceMapping', () => {
3535
3636 beforeEach ( ( ) => {
3737 engine = new ObjectQL ( ) ;
38- SchemaRegistry . clear ( ) ;
38+ SchemaRegistry . reset ( ) ;
3939 } ) ;
4040
4141 it ( 'should route objects by namespace' , async ( ) => {
@@ -62,7 +62,7 @@ describe('DatasourceMapping', () => {
6262 ) ;
6363
6464 // Test that it uses memory driver
65- const result = await engine . create ( 'account' , { name : 'Test Account' } ) ;
65+ const result = await engine . insert ( 'account' , { name : 'Test Account' } ) ;
6666 expect ( result ) . toBeDefined ( ) ;
6767 expect ( result . name ) . toBe ( 'Test Account' ) ;
6868 } ) ;
@@ -91,7 +91,7 @@ describe('DatasourceMapping', () => {
9191 'own'
9292 ) ;
9393
94- const result = await engine . create ( 'sys_user' , { username : 'admin' } ) ;
94+ const result = await engine . insert ( 'sys_user' , { username : 'admin' } ) ;
9595 expect ( result ) . toBeDefined ( ) ;
9696 } ) ;
9797
@@ -119,7 +119,7 @@ describe('DatasourceMapping', () => {
119119 ) ;
120120
121121 // Should use turso (priority 50) not memory (priority 100)
122- const result = await engine . create ( 'account' , { name : 'Test' } ) ;
122+ const result = await engine . insert ( 'account' , { name : 'Test' } ) ;
123123 expect ( result ) . toBeDefined ( ) ;
124124 } ) ;
125125
@@ -147,7 +147,7 @@ describe('DatasourceMapping', () => {
147147 ) ;
148148
149149 // Should use memory (default)
150- const result = await engine . create ( 'task' , { title : 'Do something' } ) ;
150+ const result = await engine . insert ( 'task' , { title : 'Do something' } ) ;
151151 expect ( result ) . toBeDefined ( ) ;
152152 } ) ;
153153
@@ -175,7 +175,7 @@ describe('DatasourceMapping', () => {
175175 ) ;
176176
177177 // Should use turso (explicit) not memory (mapping)
178- const result = await engine . create ( 'account' , { name : 'Test' } ) ;
178+ const result = await engine . insert ( 'account' , { name : 'Test' } ) ;
179179 expect ( result ) . toBeDefined ( ) ;
180180 } ) ;
181181} ) ;
0 commit comments