@@ -15,7 +15,7 @@ import {
1515 SourceComponent ,
1616} from '@salesforce/source-deploy-retrieve' ;
1717import { Lifecycle , SfProject } from '@salesforce/core' ;
18- import { fromStub , stubInterface , stubMethod } from '@salesforce/ts-sinon' ;
18+ import { fromStub , spyMethod , stubInterface , stubMethod } from '@salesforce/ts-sinon' ;
1919import { Config } from '@oclif/core' ;
2020import { MockTestOrgData , TestContext } from '@salesforce/core/testSetup' ;
2121import { SfCommand } from '@salesforce/sf-plugins-core' ;
@@ -205,6 +205,17 @@ describe('project delete source', () => {
205205 expect ( rmStub . callCount ) . to . equal ( 2 ) ;
206206 } ) ;
207207
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+
208219 it ( 'should pass along metadata' , async ( ) => {
209220 const metadata = [ 'ApexClass:MyClass' ] ;
210221 await runDeleteCmd ( [ '--metadata' , metadata [ 0 ] , '--json' , '-r' ] ) ;
0 commit comments