@@ -15,7 +15,7 @@ import {
15
15
SourceComponent ,
16
16
} from '@salesforce/source-deploy-retrieve' ;
17
17
import { Lifecycle , SfProject } from '@salesforce/core' ;
18
- import { fromStub , stubInterface , stubMethod } from '@salesforce/ts-sinon' ;
18
+ import { fromStub , spyMethod , stubInterface , stubMethod } from '@salesforce/ts-sinon' ;
19
19
import { Config } from '@oclif/core' ;
20
20
import { MockTestOrgData , TestContext } from '@salesforce/core/testSetup' ;
21
21
import { SfCommand } from '@salesforce/sf-plugins-core' ;
@@ -205,6 +205,17 @@ describe('project delete source', () => {
205
205
expect ( rmStub . callCount ) . to . equal ( 2 ) ;
206
206
} ) ;
207
207
208
+ it ( 'should warn if everything is forceignored' , async ( ) => {
209
+ buildComponentSetStub . restore ( ) ;
210
+ const warnSpy = spyMethod ( $$ . SANDBOX , SfCommand . prototype , 'warn' ) ;
211
+ buildComponentSetStub = stubMethod ( $$ . SANDBOX , ComponentSetBuilder , 'build' ) . resolves ( {
212
+ forceIgnoredPaths : new Set < string > ( 'myPath' ) ,
213
+ toArray : ( ) => [ ] ,
214
+ } ) ;
215
+ await runDeleteCmd ( [ '--metadata' , 'ApexClass:MyClass' , '--json' , '-r' ] ) ;
216
+ expect ( warnSpy . calledOnce ) . to . be . true ;
217
+ } ) ;
218
+
208
219
it ( 'should pass along metadata' , async ( ) => {
209
220
const metadata = [ 'ApexClass:MyClass' ] ;
210
221
await runDeleteCmd ( [ '--metadata' , metadata [ 0 ] , '--json' , '-r' ] ) ;
0 commit comments