1- import { GoogleAnalytics } from "@igniteui/cli-core" ;
2- import { spawnSync } from "child_process" ;
1+ import { GoogleAnalytics , Util } from "@igniteui/cli-core" ;
32import * as cli from "../../packages/cli/lib/cli" ;
43
54const execLocation = "packages/cli/bin/execute.js" ;
@@ -37,7 +36,7 @@ describe("Help command", () => {
3736 } ) ;
3837
3938 it ( "should show help for the new command" , async ( ) => {
40- const child = spawnSync ( "node" , [ execLocation , "new" , "--help" ] , {
39+ const child = Util . spawnSync ( "node" , [ execLocation , "new" , "--help" ] , {
4140 encoding : "utf-8"
4241 } ) ;
4342 const originalNewHelpText : string = `Options:
@@ -60,7 +59,7 @@ describe("Help command", () => {
6059 } ) ;
6160
6261 it ( "should show help for the config sub-commands" , async ( ) => {
63- const child = spawnSync ( "node" , [ execLocation , "config" , "--help" ] , {
62+ const child = Util . spawnSync ( "node" , [ execLocation , "config" , "--help" ] , {
6463 encoding : "utf-8"
6564 } ) ;
6665 const originalNewHelpText : string = `Commands:
@@ -80,7 +79,7 @@ describe("Help command", () => {
8079 } ) ;
8180
8281 it ( "should show help for the generate sub-commands" , async ( ) => {
83- const child = spawnSync ( "node" , [ execLocation , "generate" , "--help" ] , {
82+ const child = Util . spawnSync ( "node" , [ execLocation , "generate" , "--help" ] , {
8483 encoding : "utf-8"
8584 } ) ;
8685 const originalNewHelpText : string = `Commands:
@@ -97,7 +96,7 @@ describe("Help command", () => {
9796 } ) ;
9897
9998 it ( "should show help for the generate template sub-commands" , async ( ) => {
100- const child = spawnSync ( "node" , [ execLocation , "g" , "t" , "-h" ] , {
99+ const child = Util . spawnSync ( "node" , [ execLocation , "g" , "t" , "-h" ] , {
101100 encoding : "utf-8"
102101 } ) ;
103102 const originalNewHelpText : string = `
@@ -119,7 +118,7 @@ describe("Help command", () => {
119118 } ) ;
120119
121120 it ( "should show help for the list command" , async ( ) => {
122- const child = spawnSync ( "node" , [ execLocation , "list" , "-h" ] , {
121+ const child = Util . spawnSync ( "node" , [ execLocation , "list" , "-h" ] , {
123122 encoding : "utf-8"
124123 } ) ;
125124 const originalNewHelpText : string = `
@@ -137,7 +136,7 @@ describe("Help command", () => {
137136 } ) ;
138137
139138 it ( "should show help for the quickstart command" , async ( ) => {
140- const child = spawnSync ( "node" , [ execLocation , "quickstart" , "-h" ] , {
139+ const child = Util . spawnSync ( "node" , [ execLocation , "quickstart" , "-h" ] , {
141140 encoding : "utf-8"
142141 } ) ;
143142
@@ -156,7 +155,7 @@ describe("Help command", () => {
156155 } ) ;
157156
158157 it ( "should show help for the test command" , async ( ) => {
159- const child = spawnSync ( "node" , [ execLocation , "test" , "-h" ] , {
158+ const child = Util . spawnSync ( "node" , [ execLocation , "test" , "-h" ] , {
160159 encoding : "utf-8"
161160 } ) ;
162161
@@ -174,7 +173,7 @@ describe("Help command", () => {
174173 } ) ;
175174
176175 it ( "should show help for the doc command" , async ( ) => {
177- const child = spawnSync ( "node" , [ execLocation , "doc" , "-h" ] , {
176+ const child = Util . spawnSync ( "node" , [ execLocation , "doc" , "-h" ] , {
178177 encoding : "utf-8"
179178 } ) ;
180179
@@ -192,7 +191,7 @@ describe("Help command", () => {
192191 } ) ;
193192
194193 it ( "should show help for the build command" , async ( ) => {
195- const child = spawnSync ( "node" , [ execLocation , "build" , "-h" ] , {
194+ const child = Util . spawnSync ( "node" , [ execLocation , "build" , "-h" ] , {
196195 encoding : "utf-8"
197196 } ) ;
198197
@@ -210,7 +209,7 @@ describe("Help command", () => {
210209 } ) ;
211210
212211 it ( "should show help for the start command" , async ( ) => {
213- const child = spawnSync ( "node" , [ execLocation , "start" , "-h" ] , {
212+ const child = Util . spawnSync ( "node" , [ execLocation , "start" , "-h" ] , {
214213 encoding : "utf-8"
215214 } ) ;
216215
@@ -228,7 +227,7 @@ describe("Help command", () => {
228227 } ) ;
229228
230229 it ( "should show help for the upgrade command" , async ( ) => {
231- const child = spawnSync ( "node" , [ execLocation , "upgrade-packages" , "-h" ] , {
230+ const child = Util . spawnSync ( "node" , [ execLocation , "upgrade-packages" , "-h" ] , {
232231 encoding : "utf-8"
233232 } ) ;
234233
0 commit comments