Skip to content

Commit

Permalink
test: fixing cov setting
Browse files Browse the repository at this point in the history
  • Loading branch information
AnanyaJha committed Dec 22, 2020
1 parent 950ea71 commit b37a73d
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,13 @@ describe('Force Apex Test Run', () => {
describe('Apex Library Test Run Executor', async () => {
let sb: sinon.SinonSandbox;
let runTestStub: sinon.SinonStub;
let getCoverageStub: sinon.SinonStub;

beforeEach(async () => {
sb = sinon.createSandbox();
getCoverageStub = sb
.stub(sfdxCoreSettings, 'getRetrieveTestCodeCoverage')
.returns(true);
runTestStub = sb.stub(TestService.prototype, 'runTestAsynchronous');
sb.stub(workspaceContext, 'getConnection');
});
Expand All @@ -103,7 +107,7 @@ describe('Force Apex Test Run', () => {
data: { type: TestType.Class, label: 'testClass' },
type: 'CONTINUE'
});
console.log('these are the args ' + runTestStub.args[0]);

expect(runTestStub.args[0]).to.deep.equal([
{ classNames: 'testClass', testLevel: TestLevel.RunSpecifiedTests },
true
Expand All @@ -116,7 +120,7 @@ describe('Force Apex Test Run', () => {
data: { type: TestType.Suite, label: 'testSuite' },
type: 'CONTINUE'
});
console.log('these are the args ' + runTestStub.args[0]);

expect(runTestStub.args[0]).to.deep.equal([
{ suiteNames: 'testSuite', testLevel: TestLevel.RunSpecifiedTests },
true
Expand All @@ -129,7 +133,7 @@ describe('Force Apex Test Run', () => {
data: { type: TestType.All, label: '' },
type: 'CONTINUE'
});
console.log('these are the args ' + runTestStub.args[0]);

expect(runTestStub.args[0]).to.deep.equal([
{ testLevel: TestLevel.RunAllTestsInOrg },
true
Expand Down

0 comments on commit b37a73d

Please sign in to comment.