@@ -14,6 +14,16 @@ describe('SWR Hooks Generation Tests', () => {
1414 process . chdir ( origDir ) ;
1515 } ) ;
1616
17+ // deps
18+ const ver = require ( '../../../../../package.json' ) . version ;
19+ const depPkgs = [
20+ `${ path . join ( __dirname , '../../../../../.build/zenstackhq-language-' + ver + '.tgz' ) } ` ,
21+ `${ path . join ( __dirname , '../../../../../.build/zenstackhq-sdk-' + ver + '.tgz' ) } ` ,
22+ `${ path . join ( __dirname , '../../../../../.build/zenstackhq-runtime-' + ver + '.tgz' ) } ` ,
23+ `${ path . join ( __dirname , '../../../../../.build/zenstackhq-swr-' + ver + '.tgz' ) } ` ,
24+ ] ;
25+ const deps = depPkgs . join ( ' ' ) ;
26+
1727 it ( 'sqlite' , async ( ) => {
1828 const testDir = path . join ( __dirname , './test-run/sqlite' ) ;
1929 if ( fs . existsSync ( testDir ) ) {
@@ -25,6 +35,7 @@ describe('SWR Hooks Generation Tests', () => {
2535 process . chdir ( testDir ) ;
2636 const nodePath = path . join ( testDir , 'node_modules' ) ;
2737 run ( 'npm install' ) ;
38+ run ( 'npm install ' + deps ) ;
2839 run ( 'npx zenstack generate --schema ./sqlite.zmodel' , { NODE_PATH : nodePath } ) ;
2940 run ( 'npm run build' , { NODE_PATH : nodePath } ) ;
3041 } ) ;
@@ -40,6 +51,7 @@ describe('SWR Hooks Generation Tests', () => {
4051 process . chdir ( testDir ) ;
4152 const nodePath = path . join ( testDir , 'node_modules' ) ;
4253 run ( 'npm install' ) ;
54+ run ( 'npm install ' + deps ) ;
4355 run ( 'npx zenstack generate --schema ./postgres.zmodel' , { NODE_PATH : nodePath } ) ;
4456 run ( 'npm run build' , { NODE_PATH : nodePath } ) ;
4557 } ) ;
0 commit comments