Skip to content

Commit

Permalink
test: use the CLI to check preparse hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
mshanemc committed Apr 19, 2024
1 parent 4a07346 commit de6b168
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/nuts/deploy/runningTests.nut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@ describe('deploy mdapi format without tracking', () => {
expect(result?.numberTestsCompleted).to.equal(7);
});

it('deploy dir and run 2 specified tests using the installed CLI', () => {
const result = execCmd<DeployResultJson>(
'project:deploy:start --source-dir force-app --test-level RunSpecifiedTests --tests FileUtilitiesTest --tests GeocodingServiceTest --json',
{ cli: 'sf' }
).jsonOutput?.result;
expect(result?.files).to.not.be.empty;
expect(result?.numberTestsCompleted).to.equal(7);
});

it('deploy a bit of metadata and run all tests', () => {
// the project hasn't really deployed because tests keep failing coverage, etc. Deploy so all components are in the org
execCmd<DeployResultJson>('project:deploy:start --source-dir force-app', { ensureExitCode: 0 });
Expand Down

0 comments on commit de6b168

Please sign in to comment.