@@ -29,6 +29,7 @@ import { Project } from '../utils/project';
2929import { buildProjectGraph } from '../utils/projects' ;
3030import { installInDir , runScriptInPackageStreaming , yarnWorkspacesInfo } from '../utils/scripts' ;
3131import { BootstrapCommand } from './bootstrap' ;
32+ import { Kibana } from '../utils/kibana' ;
3233
3334const mockInstallInDir = installInDir as jest . Mock ;
3435const mockRunScriptInPackageStreaming = runScriptInPackageStreaming as jest . Mock ;
@@ -107,6 +108,7 @@ test('handles dependencies of dependencies', async () => {
107108 [ 'bar' , bar ] ,
108109 [ 'baz' , baz ] ,
109110 ] ) ;
111+ const kbn = new Kibana ( projects ) ;
110112 const projectGraph = buildProjectGraph ( projects ) ;
111113
112114 const logMock = jest . spyOn ( console , 'log' ) . mockImplementation ( noop ) ;
@@ -115,6 +117,7 @@ test('handles dependencies of dependencies', async () => {
115117 extraArgs : [ ] ,
116118 options : { } ,
117119 rootPath : '' ,
120+ kbn,
118121 } ) ;
119122
120123 expect ( mockInstallInDir . mock . calls ) . toMatchSnapshot ( 'install in dir' ) ;
@@ -142,6 +145,7 @@ test('does not run installer if no deps in package', async () => {
142145 [ 'kibana' , kibana ] ,
143146 [ 'bar' , bar ] ,
144147 ] ) ;
148+ const kbn = new Kibana ( projects ) ;
145149 const projectGraph = buildProjectGraph ( projects ) ;
146150
147151 const logMock = jest . spyOn ( console , 'log' ) . mockImplementation ( noop ) ;
@@ -150,6 +154,7 @@ test('does not run installer if no deps in package', async () => {
150154 extraArgs : [ ] ,
151155 options : { } ,
152156 rootPath : '' ,
157+ kbn,
153158 } ) ;
154159
155160 expect ( mockInstallInDir . mock . calls ) . toMatchSnapshot ( 'install in dir' ) ;
@@ -167,6 +172,7 @@ test('handles "frozen-lockfile"', async () => {
167172 } ) ;
168173
169174 const projects = new Map ( [ [ 'kibana' , kibana ] ] ) ;
175+ const kbn = new Kibana ( projects ) ;
170176 const projectGraph = buildProjectGraph ( projects ) ;
171177
172178 jest . spyOn ( console , 'log' ) . mockImplementation ( noop ) ;
@@ -177,6 +183,7 @@ test('handles "frozen-lockfile"', async () => {
177183 'frozen-lockfile' : true ,
178184 } ,
179185 rootPath : '' ,
186+ kbn,
180187 } ) ;
181188
182189 expect ( mockInstallInDir . mock . calls ) . toMatchSnapshot ( 'install in dir' ) ;
@@ -205,6 +212,7 @@ test('calls "kbn:bootstrap" scripts and links executables after installing deps'
205212 [ 'kibana' , kibana ] ,
206213 [ 'bar' , bar ] ,
207214 ] ) ;
215+ const kbn = new Kibana ( projects ) ;
208216 const projectGraph = buildProjectGraph ( projects ) ;
209217
210218 jest . spyOn ( console , 'log' ) . mockImplementation ( noop ) ;
@@ -213,6 +221,7 @@ test('calls "kbn:bootstrap" scripts and links executables after installing deps'
213221 extraArgs : [ ] ,
214222 options : { } ,
215223 rootPath : '' ,
224+ kbn,
216225 } ) ;
217226
218227 expect ( mockLinkProjectExecutables . mock . calls ) . toMatchSnapshot ( 'link bins' ) ;
0 commit comments