Skip to content

Commit 77d23c4

Browse files
committed
refactor: prop is code-coverage
1 parent 993cced commit 77d23c4

File tree

3 files changed

+5
-14
lines changed

3 files changed

+5
-14
lines changed

src/commands/apex/get/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export default class Test extends SfCommand<RunResult> {
8080
'output-dir': flags['output-dir'],
8181
'result-format': flags['result-format'],
8282
json: flags.json,
83-
codeCoverage: flags['code-coverage'],
83+
'code-coverage': flags['code-coverage'],
8484
});
8585
}
8686
}

src/commands/apex/run/test.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -148,16 +148,7 @@ export default class Test extends SfCommand<RunCommandResult> {
148148

149149
if ('summary' in result) {
150150
const testReporter = new TestReporter(new Ux({ jsonEnabled: this.jsonEnabled() }), conn, this.config.bin);
151-
152-
return testReporter.report(result, {
153-
wait: flags.wait,
154-
'output-dir': flags['output-dir'],
155-
'result-format': flags['result-format'],
156-
'detailed-coverage': flags['detailed-coverage'],
157-
synchronous: flags.synchronous,
158-
json: flags.json,
159-
codeCoverage: flags['code-coverage'],
160-
});
151+
return testReporter.report(result, flags);
161152
} else {
162153
// async test run
163154
this.log(messages.getMessage('runTestReportCommand', [this.config.bin, result.testRunId, conn.getUsername()]));

src/reporters/testReporter.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export class TestReporter {
4444
'detailed-coverage'?: boolean;
4545
synchronous?: boolean;
4646
json?: boolean;
47-
codeCoverage?: boolean;
47+
'code-coverage'?: boolean;
4848
}
4949
): Promise<RunResult> {
5050
if (options['output-dir']) {
@@ -54,13 +54,13 @@ export class TestReporter {
5454
jsonOutput,
5555
options['output-dir'],
5656
options['result-format'] as Optional<ResultFormat>,
57-
options['detailed-coverage'] as boolean,
57+
Boolean(options['detailed-coverage']),
5858
options.synchronous
5959
);
6060

6161
const testService = new TestService(this.connection);
6262

63-
await testService.writeResultFiles(result, outputDirConfig, options.codeCoverage);
63+
await testService.writeResultFiles(result, outputDirConfig, options['code-coverage']);
6464
}
6565

6666
try {

0 commit comments

Comments
 (0)