Skip to content

Commit ca8ba02

Browse files
authored
Merge pull request #980 from salesforcecli/sm/tests-using-sf-preparse-hooks
test: multipe flags using sf preparse hooks
2 parents 5b132e5 + abb98dd commit ca8ba02

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/nuts/deploy/runningTests.nut.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,15 @@ describe('deploy mdapi format without tracking', () => {
4343
expect(result?.numberTestsCompleted).to.equal(7);
4444
});
4545

46+
it('deploy dir and run 2 specified tests using the installed CLI', () => {
47+
const result = execCmd<DeployResultJson>(
48+
'project:deploy:start --source-dir force-app --test-level RunSpecifiedTests --tests FileUtilitiesTest --tests GeocodingServiceTest --json',
49+
{ cli: 'sf' }
50+
).jsonOutput?.result;
51+
expect(result?.files).to.not.be.empty;
52+
expect(result?.numberTestsCompleted).to.equal(7);
53+
});
54+
4655
it('deploy a bit of metadata and run all tests', () => {
4756
// the project hasn't really deployed because tests keep failing coverage, etc. Deploy so all components are in the org
4857
execCmd<DeployResultJson>('project:deploy:start --source-dir force-app', { ensureExitCode: 0 });

0 commit comments

Comments
 (0)