@@ -7,6 +7,10 @@ import * as sinon from "sinon";
7
7
import * as temp from "temp" ;
8
8
import * as path from "path" ;
9
9
import * as util from "util" ;
10
+ import { IInjector } from "../src/common/definitions/yok" ;
11
+ import { IOptions } from "../src/declarations" ;
12
+ import { IDictionary } from "../src/common/declarations" ;
13
+
10
14
temp . track ( ) ;
11
15
12
16
interface IPacoteOutput {
@@ -20,7 +24,7 @@ const dummyUser = "devUsername";
20
24
const dummyName = "devPlugin" ;
21
25
const createDemoProjectAnswer = true ;
22
26
const creteDemoProjectOption = "y" ;
23
- const dummyPacote : IPacoteOutput = { packageName : "" , destinationDirectory : "" } ;
27
+ const dummyPacote : IPacoteOutput = { packageName : "" , destinationDirectory : "" } ;
24
28
25
29
function createTestInjector ( ) {
26
30
const testInjector = new Yok ( ) ;
@@ -67,14 +71,14 @@ describe("Plugin create command tests", () => {
67
71
let createPluginCommand : CreatePluginCommand ;
68
72
69
73
beforeEach ( ( ) => {
70
- helpers . setIsInteractive ( ( ) => true ) ;
74
+ helpers . setIsInteractive ( ( ) => true ) ;
71
75
testInjector = createTestInjector ( ) ;
72
76
options = testInjector . resolve ( "$options" ) ;
73
77
createPluginCommand = testInjector . resolve ( "$createCommand" ) ;
74
78
} ) ;
75
79
76
80
afterEach ( ( ) => {
77
- helpers . setIsInteractive ( null ) ;
81
+ helpers . setIsInteractive ( null ) ;
78
82
} ) ;
79
83
80
84
describe ( "#CreatePluginCommand" , ( ) => {
@@ -83,7 +87,7 @@ describe("Plugin create command tests", () => {
83
87
} ) ;
84
88
85
89
it ( "should use correct directory when path parameter is passed" , async ( ) => {
86
- helpers . setIsInteractive ( ( ) => false ) ;
90
+ helpers . setIsInteractive ( ( ) => false ) ;
87
91
const dummyPath = "dummyPath" ;
88
92
options . path = dummyPath ;
89
93
dummyPacote . destinationDirectory = "" ;
@@ -92,7 +96,7 @@ describe("Plugin create command tests", () => {
92
96
} ) ;
93
97
94
98
it ( "should use correct download path when template parameter is passed" , async ( ) => {
95
- helpers . setIsInteractive ( ( ) => false ) ;
99
+ helpers . setIsInteractive ( ( ) => false ) ;
96
100
const dummyTemplate = "dummyTemplate" ;
97
101
options . template = dummyTemplate ;
98
102
dummyPacote . packageName = "" ;
@@ -101,7 +105,7 @@ describe("Plugin create command tests", () => {
101
105
} ) ;
102
106
103
107
it ( "should pass when only project name is set in non-interactive shell." , async ( ) => {
104
- helpers . setIsInteractive ( ( ) => false ) ;
108
+ helpers . setIsInteractive ( ( ) => false ) ;
105
109
await createPluginCommand . execute ( dummyArgs ) ;
106
110
} ) ;
107
111
0 commit comments