@@ -112,47 +112,43 @@ suite('Module Installer', () => {
112112 moduleInstaller . verify ( m => m . installModule ( TypeMoq . It . isValue ( moduleName ) , TypeMoq . It . isValue ( resource ) ) , TypeMoq . Times . once ( ) ) ;
113113 }
114114 } ) ;
115- test ( `Ensure the prompt is displayed only once, untill the prompt is closed, ${ product . name } (${ resource ? 'With a resource' : 'without a resource' } )` , async function ( ) {
116- if ( product . value === Product . unittest ) {
117- return this . skip ( ) ;
118- }
119- workspaceService . setup ( w => w . getWorkspaceFolder ( TypeMoq . It . isValue ( resource ! ) ) )
120- . returns ( ( ) => TypeMoq . Mock . ofType < WorkspaceFolder > ( ) . object )
121- . verifiable ( TypeMoq . Times . exactly ( resource ? 5 : 0 ) ) ;
122- app . setup ( a => a . showErrorMessage ( TypeMoq . It . isAny ( ) , TypeMoq . It . isAny ( ) , TypeMoq . It . isAny ( ) , TypeMoq . It . isAny ( ) , TypeMoq . It . isAny ( ) , TypeMoq . It . isAny ( ) , TypeMoq . It . isAny ( ) , TypeMoq . It . isAny ( ) ) )
123- . returns ( ( ) => promptDeferred . promise )
124- . verifiable ( TypeMoq . Times . once ( ) ) ;
125-
126- // Display first prompt.
127- installer . promptToInstall ( product . value , resource ) . ignoreErrors ( ) ;
128-
129- // Display a few more prompts.
130- installer . promptToInstall ( product . value , resource ) . ignoreErrors ( ) ;
131- installer . promptToInstall ( product . value , resource ) . ignoreErrors ( ) ;
132- installer . promptToInstall ( product . value , resource ) . ignoreErrors ( ) ;
133- installer . promptToInstall ( product . value , resource ) . ignoreErrors ( ) ;
134-
135- app . verifyAll ( ) ;
136- workspaceService . verifyAll ( ) ;
137- } ) ;
138- test ( `Ensure the prompt is displayed again when previous prompt has been closed, ${ product . name } (${ resource ? 'With a resource' : 'without a resource' } )` , async function ( ) {
139- if ( product . value === Product . unittest ) {
140- return this . skip ( ) ;
141- }
142- workspaceService . setup ( w => w . getWorkspaceFolder ( TypeMoq . It . isValue ( resource ! ) ) )
143- . returns ( ( ) => TypeMoq . Mock . ofType < WorkspaceFolder > ( ) . object )
144- . verifiable ( TypeMoq . Times . exactly ( resource ? 3 : 0 ) ) ;
145- app . setup ( a => a . showErrorMessage ( TypeMoq . It . isAny ( ) , TypeMoq . It . isAny ( ) , TypeMoq . It . isAny ( ) , TypeMoq . It . isAny ( ) , TypeMoq . It . isAny ( ) , TypeMoq . It . isAny ( ) , TypeMoq . It . isAny ( ) , TypeMoq . It . isAny ( ) ) )
146- . returns ( ( ) => Promise . resolve ( undefined ) )
147- . verifiable ( TypeMoq . Times . exactly ( 3 ) ) ;
148-
149- await installer . promptToInstall ( product . value , resource ) ;
150- await installer . promptToInstall ( product . value , resource ) ;
151- await installer . promptToInstall ( product . value , resource ) ;
152-
153- app . verifyAll ( ) ;
154- workspaceService . verifyAll ( ) ;
155- } ) ;
115+ if ( product . value !== Product . unittest ) {
116+ test ( `Ensure the prompt is displayed only once, untill the prompt is closed, ${ product . name } (${ resource ? 'With a resource' : 'without a resource' } )` , async ( ) => {
117+ workspaceService . setup ( w => w . getWorkspaceFolder ( TypeMoq . It . isValue ( resource ! ) ) )
118+ . returns ( ( ) => TypeMoq . Mock . ofType < WorkspaceFolder > ( ) . object )
119+ . verifiable ( TypeMoq . Times . exactly ( resource ? 5 : 0 ) ) ;
120+ app . setup ( a => a . showErrorMessage ( TypeMoq . It . isAny ( ) , TypeMoq . It . isAny ( ) , TypeMoq . It . isAny ( ) , TypeMoq . It . isAny ( ) , TypeMoq . It . isAny ( ) , TypeMoq . It . isAny ( ) , TypeMoq . It . isAny ( ) , TypeMoq . It . isAny ( ) ) )
121+ . returns ( ( ) => promptDeferred . promise )
122+ . verifiable ( TypeMoq . Times . once ( ) ) ;
123+
124+ // Display first prompt.
125+ installer . promptToInstall ( product . value , resource ) . ignoreErrors ( ) ;
126+
127+ // Display a few more prompts.
128+ installer . promptToInstall ( product . value , resource ) . ignoreErrors ( ) ;
129+ installer . promptToInstall ( product . value , resource ) . ignoreErrors ( ) ;
130+ installer . promptToInstall ( product . value , resource ) . ignoreErrors ( ) ;
131+ installer . promptToInstall ( product . value , resource ) . ignoreErrors ( ) ;
132+
133+ app . verifyAll ( ) ;
134+ workspaceService . verifyAll ( ) ;
135+ } ) ;
136+ test ( `Ensure the prompt is displayed again when previous prompt has been closed, ${ product . name } (${ resource ? 'With a resource' : 'without a resource' } )` , async ( ) => {
137+ workspaceService . setup ( w => w . getWorkspaceFolder ( TypeMoq . It . isValue ( resource ! ) ) )
138+ . returns ( ( ) => TypeMoq . Mock . ofType < WorkspaceFolder > ( ) . object )
139+ . verifiable ( TypeMoq . Times . exactly ( resource ? 3 : 0 ) ) ;
140+ app . setup ( a => a . showErrorMessage ( TypeMoq . It . isAny ( ) , TypeMoq . It . isAny ( ) , TypeMoq . It . isAny ( ) , TypeMoq . It . isAny ( ) , TypeMoq . It . isAny ( ) , TypeMoq . It . isAny ( ) , TypeMoq . It . isAny ( ) , TypeMoq . It . isAny ( ) ) )
141+ . returns ( ( ) => Promise . resolve ( undefined ) )
142+ . verifiable ( TypeMoq . Times . exactly ( 3 ) ) ;
143+
144+ await installer . promptToInstall ( product . value , resource ) ;
145+ await installer . promptToInstall ( product . value , resource ) ;
146+ await installer . promptToInstall ( product . value , resource ) ;
147+
148+ app . verifyAll ( ) ;
149+ workspaceService . verifyAll ( ) ;
150+ } ) ;
151+ }
156152 }
157153 }
158154 } ) ;
0 commit comments