From 04df5ab605b02d64e84dbd19b1abc1b757b23270 Mon Sep 17 00:00:00 2001 From: "Kyle Capehart (Huntersville)" Date: Tue, 25 Jun 2024 10:55:45 -0400 Subject: [PATCH 1/4] feat: add concise flag to apex run test and apex get test --- command-snapshot.json | 6 ++- messages/gettest.md | 4 ++ messages/runtest.md | 4 ++ package.json | 4 +- src/commands/apex/get/test.ts | 4 ++ src/commands/apex/run/test.ts | 3 ++ src/reporters/testReporter.ts | 13 +++--- test/commands/apex/get/test.test.ts | 30 +++++++++++++- test/commands/apex/run/test.test.ts | 25 ++++++++++++ test/testData.ts | 62 +++++++++++++++++++++++++++++ test/tsconfig.json | 5 ++- tsconfig.json | 6 ++- yarn.lock | 42 ++++++++++++++----- 13 files changed, 187 insertions(+), 21 deletions(-) diff --git a/command-snapshot.json b/command-snapshot.json index 5ea14fbe..f8971742 100644 --- a/command-snapshot.json +++ b/command-snapshot.json @@ -30,7 +30,8 @@ "output-dir", "result-format", "target-org", - "test-run-id" + "test-run-id", + "concise" ], "plugin": "@salesforce/plugin-apex" }, @@ -82,7 +83,8 @@ "target-org", "test-level", "tests", - "wait" + "wait", + "concise" ], "plugin": "@salesforce/plugin-apex" }, diff --git a/messages/gettest.md b/messages/gettest.md index 69009000..63225407 100644 --- a/messages/gettest.md +++ b/messages/gettest.md @@ -32,6 +32,10 @@ ID of the test run. Directory in which to store test result files. +# flags.concise.summary + +Only display failed test results for human-readable output. + # apexLibErr Unknown error in Apex Library: %s diff --git a/messages/runtest.md b/messages/runtest.md index 7b9cde8a..1a7b9536 100644 --- a/messages/runtest.md +++ b/messages/runtest.md @@ -96,6 +96,10 @@ Runs test methods from a single Apex class synchronously; if not specified, test Display detailed code coverage per test. +# flags.concise.summary + +Only display failed test results for human-readable output. + # runTestReportCommand Run "%s apex get test -i %s -o %s" to retrieve test results diff --git a/package.json b/package.json index cedbcad7..717cba7c 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,8 @@ "bugs": "https://github.com/forcedotcom/cli/issues", "dependencies": { "@oclif/core": "^4", - "@salesforce/apex-node": "^6.1.2", - "@salesforce/core": "^7.4.1", + "@salesforce/apex-node": "^6.2.0", + "@salesforce/core": "^7.5.0", "@salesforce/kit": "^3.1.6", "@salesforce/sf-plugins-core": "^11.1.0", "ansis": "^3.2.0" diff --git a/src/commands/apex/get/test.ts b/src/commands/apex/get/test.ts index 45e529b7..9f185f99 100644 --- a/src/commands/apex/get/test.ts +++ b/src/commands/apex/get/test.ts @@ -48,6 +48,9 @@ export default class Test extends SfCommand { summary: messages.getMessage('flags.output-dir.summary'), }), 'result-format': resultFormatFlag, + concise: Flags.boolean({ + summary: messages.getMessage('flags.concise.summary'), + }), }; public async run(): Promise { @@ -65,6 +68,7 @@ export default class Test extends SfCommand { 'result-format': flags['result-format'], json: flags.json, 'code-coverage': flags['code-coverage'], + concise: flags['concise'], }); } } diff --git a/src/commands/apex/run/test.ts b/src/commands/apex/run/test.ts index f9365f49..2775430c 100644 --- a/src/commands/apex/run/test.ts +++ b/src/commands/apex/run/test.ts @@ -94,6 +94,9 @@ export default class Test extends SfCommand { summary: messages.getMessage('flags.detailed-coverage.summary'), dependsOn: ['code-coverage'], }), + concise: Flags.boolean({ + summary: messages.getMessage('flags.concise.summary'), + }), }; protected cancellationTokenSource = new CancellationTokenSource(); diff --git a/src/reporters/testReporter.ts b/src/reporters/testReporter.ts index 087b7d85..2b561c34 100644 --- a/src/reporters/testReporter.ts +++ b/src/reporters/testReporter.ts @@ -45,6 +45,7 @@ export class TestReporter { synchronous?: boolean; json?: boolean; 'code-coverage'?: boolean; + concise: boolean; } ): Promise { if (options['output-dir']) { @@ -55,6 +56,7 @@ export class TestReporter { options['output-dir'], options['result-format'] as ResultFormat | undefined, Boolean(options['detailed-coverage']), + options['concise'], options.synchronous ); @@ -69,7 +71,7 @@ export class TestReporter { } switch (options['result-format']) { case 'human': - this.logHuman(result, options['detailed-coverage'] as boolean, options['output-dir']); + this.logHuman(result, options['detailed-coverage'] as boolean, options['concise'], options['output-dir']); break; case 'tap': this.logTap(result); @@ -87,7 +89,7 @@ export class TestReporter { } break; default: - this.logHuman(result, options['detailed-coverage'] as boolean, options['output-dir']); + this.logHuman(result, options['detailed-coverage'] as boolean, options['concise'], options['output-dir']); } } catch (e) { this.ux.styledJSON(result); @@ -114,6 +116,7 @@ export class TestReporter { outputDir: string, resultFormat: ResultFormat | undefined, detailedCoverage: boolean, + concise: boolean, synchronous = false ): OutputDirConfig { const outputDirConfig: OutputDirConfig = { @@ -162,7 +165,7 @@ export class TestReporter { case ResultFormat.human: outputDirConfig.fileInfos?.push({ filename: 'test-result.txt', - content: new HumanReporter().format(result, detailedCoverage), + content: new HumanReporter().format(result, detailedCoverage, concise), }); break; default: @@ -182,12 +185,12 @@ export class TestReporter { } } - private logHuman(result: TestResult, detailedCoverage: boolean, outputDir?: string): void { + private logHuman(result: TestResult, detailedCoverage: boolean, concise: boolean, outputDir?: string): void { if (outputDir) { this.ux.log(messages.getMessage('outputDirHint', [outputDir])); } const humanReporter = new HumanReporter(); - const output = humanReporter.format(result, detailedCoverage); + const output = humanReporter.format(result, detailedCoverage, concise); this.ux.log(output); } diff --git a/test/commands/apex/get/test.test.ts b/test/commands/apex/get/test.test.ts index 39da5b25..f118e79c 100644 --- a/test/commands/apex/get/test.test.ts +++ b/test/commands/apex/get/test.test.ts @@ -12,7 +12,14 @@ import { Config } from '@oclif/core'; import { expect } from 'chai'; import { TestService } from '@salesforce/apex-node'; import Test from '../../../../src/commands/apex/get/test.js'; -import { runWithFailures, testRunSimple, testRunSimpleResult, testRunWithFailuresResult } from '../../../testData.js'; +import { + runWithCoverage, + runWithFailureAndSuccess, + runWithFailures, + testRunSimple, + testRunSimpleResult, + testRunWithFailuresResult, +} from '../../../testData.js'; let logStub: sinon.SinonStub; let styledJsonStub: sinon.SinonStub; @@ -106,6 +113,16 @@ describe('apex:test:report', () => { ).run(); expect(logStub.firstCall.args[0]).to.contain('Test result files written to myDirectory'); }); + + it('should only display failed test with human format with concise flag', async () => { + sandbox.stub(TestService.prototype, 'reportAsyncResults').resolves(runWithFailureAndSuccess); + await new Test(['--test-run-id', '707xxxxxxxxxxxx', '--result-format', 'human', '--concise'], config).run(); + expect(logStub.firstCall.args[0]).to.contain('Test Summary'); + expect(logStub.firstCall.args[0]).to.contain('Test Results'); + expect(logStub.firstCall.args[0]).to.contain('MyFailingTest'); + expect(logStub.firstCall.args[0]).to.not.contain('MyPassingTest'); + expect(logStub.firstCall.args[0]).to.not.contain('Apex Code Coverage by Class'); + }); }); describe('test success', () => { @@ -172,5 +189,16 @@ describe('apex:test:report', () => { ).run(); expect(logStub.firstCall.args[0]).to.contain('Test result files written to myDirectory'); }); + + it('should only display summary with human format and code coverage and concise parameters', async () => { + sandbox.stub(TestService.prototype, 'reportAsyncResults').resolves(runWithCoverage); + await new Test( + ['--test-run-id', '707xxxxxxxxxxxx', '--result-format', 'human', '--code-coverage', '--concise'], + config + ).run(); + expect(logStub.firstCall.args[0]).to.contain('Test Summary'); + expect(logStub.firstCall.args[0]).to.not.contain('Test Results'); + expect(logStub.firstCall.args[0]).to.not.contain('Apex Code Coverage by Class'); + }); }); }); diff --git a/test/commands/apex/run/test.test.ts b/test/commands/apex/run/test.test.ts index 19ec3c6a..01203c2d 100644 --- a/test/commands/apex/run/test.test.ts +++ b/test/commands/apex/run/test.test.ts @@ -14,6 +14,7 @@ import { TestService } from '@salesforce/apex-node'; import Test from '../../../../src/commands/apex/run/test.js'; import { runWithCoverage, + runWithFailureAndSuccess, runWithFailures, testRunSimple, testRunSimpleResult, @@ -115,6 +116,19 @@ describe('apex:test:run', () => { expect(logStub.firstCall.args[0]).to.not.contain('Apex Code Coverage by Class'); }); + it('should only display failed test with human format with concise flag', async () => { + sandbox.stub(TestService.prototype, 'runTestSynchronous').resolves(runWithFailureAndSuccess); + await new Test( + ['--tests', 'MyApexTests', '--result-format', 'human', '--synchronous', '--concise'], + config + ).run(); + expect(logStub.firstCall.args[0]).to.contain('Test Summary'); + expect(logStub.firstCall.args[0]).to.contain('Test Results'); + expect(logStub.firstCall.args[0]).to.contain('MyFailingTest'); + expect(logStub.firstCall.args[0]).to.not.contain('MyPassingTest'); + expect(logStub.firstCall.args[0]).to.not.contain('Apex Code Coverage by Class'); + }); + it('will build the sync correct payload', async () => { const buildPayloadSpy = sandbox.spy(TestService.prototype, 'buildSyncPayload'); const runTestSynchronousSpy = sandbox.stub(TestService.prototype, 'runTestSynchronous').resolves(runWithFailures); @@ -457,6 +471,17 @@ describe('apex:test:run', () => { ], }); }); + + it('should only display summary with human format and code coverage and concise parameters', async () => { + sandbox.stub(TestService.prototype, 'runTestSynchronous').resolves(runWithCoverage); + await new Test( + ['--tests', 'MyApexTests', '--result-format', 'human', '--synchronous', '--code-coverage', '--concise'], + config + ).run(); + expect(logStub.firstCall.args[0]).to.contain('Test Summary'); + expect(logStub.firstCall.args[0]).to.not.contain('Test Results'); + expect(logStub.firstCall.args[0]).to.not.contain('Apex Code Coverage by Class'); + }); }); describe('validateFlags', () => { diff --git a/test/testData.ts b/test/testData.ts index 84b71bcf..21ebc980 100644 --- a/test/testData.ts +++ b/test/testData.ts @@ -375,6 +375,68 @@ export const failureResult = { ], }; +export const runWithFailureAndSuccess: TestResult = { + summary: { + failRate: '50%', + testsRan: 2, + orgId: '00D4xx00000FH4IEAW', + outcome: 'Failed', + passing: 1, + failing: 1, + skipped: 0, + passRate: '50%', + skipRate: '0%', + testStartTime: '2020-08-25T00:48:02.000+0000', + testExecutionTimeInMs: 53, + commandTimeInMs: 60, + testTotalTimeInMs: 53, + hostname: 'https://na139.salesforce.com', + testRunId: '707xx0000AUS2gH', + userId: '005xx000000uEgSAAU', + username: 'test@example.com', + }, + tests: [ + { + id: '07Mxx00000ErgiHUAR', + queueItemId: '709xx000001IlUMQA0', + stackTrace: 'Error running test', + message: null, + asyncApexJobId: '707xx0000AUS2gHQQT', + methodName: 'failingTestConfig', + outcome: ApexTestResultOutcome.Fail, + apexLogId: null, + apexClass: { + id: '01pxx00000NWwb3AAD', + name: 'MyFailingTest', + namespacePrefix: '', + fullName: 'MyFailingTest', + }, + runTime: 53, + testTimestamp: '2020-08-25T00:48:02.000+0000', + fullName: 'MyFailingTest.testConfig', + }, + { + id: '07Mxx00000ErgiHUAR', + queueItemId: '709xx000001IlUMQA0', + stackTrace: '', + message: '', + asyncApexJobId: '707xx0000AUS2gHQQT', + methodName: 'passingTestConfig', + outcome: ApexTestResultOutcome.Pass, + apexLogId: null, + apexClass: { + id: '01pxx00000NWwb3AAD', + name: 'MyPassingTest', + namespacePrefix: '', + fullName: 'MyPassingTest', + }, + runTime: 53, + testTimestamp: '2020-08-25T00:48:02.000+0000', + fullName: 'MyPassingTest.testConfig', + }, + ], +}; + export const jsonResult: RunResult = { summary: { commandTime: '60 ms', diff --git a/test/tsconfig.json b/test/tsconfig.json index a12e09de..a753b27d 100644 --- a/test/tsconfig.json +++ b/test/tsconfig.json @@ -3,6 +3,9 @@ "include": ["./**/*.ts"], "compilerOptions": { "skipLibCheck": true, - "strictNullChecks": true + "strictNullChecks": true, + "paths": { + "@salesforce/core": ["../node_modules/@salesforce/core"] + } } } diff --git a/tsconfig.json b/tsconfig.json index e21f437d..d2f37ff1 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,7 +4,11 @@ "outDir": "lib", "rootDir": "src", "skipLibCheck": true, - "strictNullChecks": true + "strictNullChecks": true, + "baseUrl": ".", + "paths": { + "@salesforce/core": ["node_modules/@salesforce/core"] + } }, "include": ["./src/**/*.ts"] } diff --git a/yarn.lock b/yarn.lock index b6d7cf06..722fc663 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1710,16 +1710,16 @@ resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg== -"@salesforce/apex-node@^6.1.2": - version "6.1.2" - resolved "https://registry.yarnpkg.com/@salesforce/apex-node/-/apex-node-6.1.2.tgz#c02a7843b448bb22f22c0c3e64cb111dd0c0857e" - integrity sha512-GF1ou91qxtTIduK4idq+OtQ3sKAXwA3WYLTYXPfJ+HiWQu9Qq/aRFSyl3I/+DAXqtTXXYJL3ocdZ7KH5EzBCJg== +"@salesforce/apex-node@^6.2.0": + version "6.2.0" + resolved "https://registry.yarnpkg.com/@salesforce/apex-node/-/apex-node-6.2.0.tgz#9a326e3f6ce3c34ec0aa001a924635c4ab7acc64" + integrity sha512-8sp5TChnKcXoPSKMieUVXeeuxnNv3bx6QlH7+a8s6ja0UVYfWVPJi1Wc9vL6dZuVM79LeDV96RDKnJ3o6FehXg== dependencies: "@jsforce/jsforce-node" "^3.2.0" - "@salesforce/core" "^7.3.10" - "@salesforce/kit" "^3.1.2" + "@salesforce/core" "^7.5.0" + "@salesforce/kit" "^3.1.6" "@types/istanbul-reports" "^3.0.4" - bfj "^8.0.0" + bfj "8.0.0" faye "1.4.0" glob "^10.3.16" istanbul-lib-coverage "^3.2.2" @@ -1742,7 +1742,7 @@ strip-ansi "6.0.1" ts-retry-promise "^0.8.1" -"@salesforce/core@^7.3.10", "@salesforce/core@^7.3.12", "@salesforce/core@^7.4.1": +"@salesforce/core@^7.3.12", "@salesforce/core@^7.4.1": version "7.4.1" resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-7.4.1.tgz#7c37623f6a89c199bf12cd6dc28d89bc950914ef" integrity sha512-ccYs7uL4GYjdOcc44trfRnaz69kG0jU0aoT0qjPkIel8oVOyEoXaoDCG0A+2diqmicDp5uWK0pNs+tdWNj2mcQ== @@ -1766,6 +1766,30 @@ semver "^7.6.2" ts-retry-promise "^0.8.1" +"@salesforce/core@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-7.5.0.tgz#cfa57281978c9d5df6f7419e5bc58ea914726cf5" + integrity sha512-mPg9Tj2Qqe/TY7q+CRNSeYYTV+dj/LflM7Fu/32EPLCEPGVIiSp/RaTFLTZwDcFX9BVYHOa2h6oliuO2Qnno+A== + dependencies: + "@jsforce/jsforce-node" "^3.2.0" + "@salesforce/kit" "^3.1.6" + "@salesforce/schemas" "^1.9.0" + "@salesforce/ts-types" "^2.0.10" + ajv "^8.15.0" + change-case "^4.1.2" + fast-levenshtein "^3.0.0" + faye "^1.4.0" + form-data "^4.0.0" + js2xmlparser "^4.0.1" + jsonwebtoken "9.0.2" + jszip "3.10.1" + pino "^9.2.0" + pino-abstract-transport "^1.2.0" + pino-pretty "^11.2.1" + proper-lockfile "^4.1.2" + semver "^7.6.2" + ts-retry-promise "^0.8.1" + "@salesforce/core@^8.0.3": version "8.0.3" resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-8.0.3.tgz#8b25ce46100baef0a8e731b42d373edf508ab144" @@ -3372,7 +3396,7 @@ base64url@^3.0.1: resolved "https://registry.yarnpkg.com/base64url/-/base64url-3.0.1.tgz#6399d572e2bc3f90a9a8b22d5dbb0a32d33f788d" integrity sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A== -bfj@^8.0.0: +bfj@8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/bfj/-/bfj-8.0.0.tgz#d15931bd5ef1ef5c874a59e6ef00653de8416568" integrity sha512-6KJe4gFrZ4lhmvWcUIj37yFAs36mi2FZXuTkw6udZ/QsX/znFypW4SatqcLA5K5T4BAWgJZD73UFEJJQxuJjoA== From 4feedb40fd46feadf0a5676d368e6cb34e9ec585 Mon Sep 17 00:00:00 2001 From: "Kyle Capehart (Huntersville)" Date: Tue, 25 Jun 2024 13:55:29 -0400 Subject: [PATCH 2/4] chore: update language in flag descriptions per recommendations --- messages/gettest.md | 2 +- messages/runtest.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/messages/gettest.md b/messages/gettest.md index 63225407..80d4cc07 100644 --- a/messages/gettest.md +++ b/messages/gettest.md @@ -34,7 +34,7 @@ Directory in which to store test result files. # flags.concise.summary -Only display failed test results for human-readable output. +Display only failed test results; works with human-readable output only. # apexLibErr diff --git a/messages/runtest.md b/messages/runtest.md index 1a7b9536..25362678 100644 --- a/messages/runtest.md +++ b/messages/runtest.md @@ -98,7 +98,7 @@ Display detailed code coverage per test. # flags.concise.summary -Only display failed test results for human-readable output. +Display only failed test results; works with human-readable output only. # runTestReportCommand From 60120175aac751ff5e88102bae12597868ce2d82 Mon Sep 17 00:00:00 2001 From: "Kyle Capehart (Huntersville)" Date: Tue, 16 Jul 2024 09:53:55 -0400 Subject: [PATCH 3/4] revert: undo changes to tsconfig --- test/commands/apex/get/test.test.ts | 7 ++----- test/commands/apex/run/test.test.ts | 18 ++++++++++-------- test/tsconfig.json | 5 +---- tsconfig.json | 6 +----- 4 files changed, 14 insertions(+), 22 deletions(-) diff --git a/test/commands/apex/get/test.test.ts b/test/commands/apex/get/test.test.ts index 679a447a..927698f2 100644 --- a/test/commands/apex/get/test.test.ts +++ b/test/commands/apex/get/test.test.ts @@ -115,7 +115,7 @@ describe('apex:test:report', () => { it('should only display failed test with human format with concise flag', async () => { sandbox.stub(TestService.prototype, 'reportAsyncResults').resolves(runWithFailureAndSuccess); - await new Test(['--test-run-id', '707xxxxxxxxxxxx', '--result-format', 'human', '--concise'], config).run(); + await Test.run(['--test-run-id', '707xxxxxxxxxxxx', '--result-format', 'human', '--concise']); expect(logStub.firstCall.args[0]).to.contain('Test Summary'); expect(logStub.firstCall.args[0]).to.contain('Test Results'); expect(logStub.firstCall.args[0]).to.contain('MyFailingTest'); @@ -188,10 +188,7 @@ describe('apex:test:report', () => { it('should only display summary with human format and code coverage and concise parameters', async () => { sandbox.stub(TestService.prototype, 'reportAsyncResults').resolves(runWithCoverage); - await new Test( - ['--test-run-id', '707xxxxxxxxxxxx', '--result-format', 'human', '--code-coverage', '--concise'], - config - ).run(); + await Test.run(['--test-run-id', '707xxxxxxxxxxxx', '--result-format', 'human', '--code-coverage', '--concise']); expect(logStub.firstCall.args[0]).to.contain('Test Summary'); expect(logStub.firstCall.args[0]).to.not.contain('Test Results'); expect(logStub.firstCall.args[0]).to.not.contain('Apex Code Coverage by Class'); diff --git a/test/commands/apex/run/test.test.ts b/test/commands/apex/run/test.test.ts index 5f257da1..7d0a9702 100644 --- a/test/commands/apex/run/test.test.ts +++ b/test/commands/apex/run/test.test.ts @@ -116,10 +116,7 @@ describe('apex:test:run', () => { it('should only display failed test with human format with concise flag', async () => { sandbox.stub(TestService.prototype, 'runTestSynchronous').resolves(runWithFailureAndSuccess); - await new Test( - ['--tests', 'MyApexTests', '--result-format', 'human', '--synchronous', '--concise'], - config - ).run(); + await Test.run(['--tests', 'MyApexTests', '--result-format', 'human', '--synchronous', '--concise']); expect(logStub.firstCall.args[0]).to.contain('Test Summary'); expect(logStub.firstCall.args[0]).to.contain('Test Results'); expect(logStub.firstCall.args[0]).to.contain('MyFailingTest'); @@ -476,10 +473,15 @@ describe('apex:test:run', () => { it('should only display summary with human format and code coverage and concise parameters', async () => { sandbox.stub(TestService.prototype, 'runTestSynchronous').resolves(runWithCoverage); - await new Test( - ['--tests', 'MyApexTests', '--result-format', 'human', '--synchronous', '--code-coverage', '--concise'], - config - ).run(); + await Test.run([ + '--tests', + 'MyApexTests', + '--result-format', + 'human', + '--synchronous', + '--code-coverage', + '--concise', + ]); expect(logStub.firstCall.args[0]).to.contain('Test Summary'); expect(logStub.firstCall.args[0]).to.not.contain('Test Results'); expect(logStub.firstCall.args[0]).to.not.contain('Apex Code Coverage by Class'); diff --git a/test/tsconfig.json b/test/tsconfig.json index a753b27d..a12e09de 100644 --- a/test/tsconfig.json +++ b/test/tsconfig.json @@ -3,9 +3,6 @@ "include": ["./**/*.ts"], "compilerOptions": { "skipLibCheck": true, - "strictNullChecks": true, - "paths": { - "@salesforce/core": ["../node_modules/@salesforce/core"] - } + "strictNullChecks": true } } diff --git a/tsconfig.json b/tsconfig.json index d2f37ff1..e21f437d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,11 +4,7 @@ "outDir": "lib", "rootDir": "src", "skipLibCheck": true, - "strictNullChecks": true, - "baseUrl": ".", - "paths": { - "@salesforce/core": ["node_modules/@salesforce/core"] - } + "strictNullChecks": true }, "include": ["./src/**/*.ts"] } From 19c73fd8873f146e097efb06f382dd3f6a42fff3 Mon Sep 17 00:00:00 2001 From: mshanemc Date: Fri, 16 Aug 2024 08:25:49 -0500 Subject: [PATCH 4/4] style: dot notation > bracket where possible --- src/commands/apex/get/test.ts | 2 +- src/reporters/testReporter.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/apex/get/test.ts b/src/commands/apex/get/test.ts index 2cb1cc16..ec172972 100644 --- a/src/commands/apex/get/test.ts +++ b/src/commands/apex/get/test.ts @@ -68,7 +68,7 @@ export default class Test extends SfCommand { 'result-format': flags['result-format'], json: flags.json, 'code-coverage': flags['code-coverage'], - concise: flags['concise'], + concise: flags.concise, }); } } diff --git a/src/reporters/testReporter.ts b/src/reporters/testReporter.ts index 973201a3..bbafab6a 100644 --- a/src/reporters/testReporter.ts +++ b/src/reporters/testReporter.ts @@ -55,7 +55,7 @@ export class TestReporter { options['output-dir'], options['result-format'] as ResultFormat | undefined, Boolean(options['detailed-coverage']), - options['concise'], + options.concise, options.synchronous );