File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
src/commands/apex-code-coverage/transformer
test/commands/transformer Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -44,9 +44,10 @@ export default class TransformerTransform extends SfCommand<TransformerTransform
44
44
public async run ( ) : Promise < TransformerTransformResult > {
45
45
const { flags } = await this . parse ( TransformerTransform ) ;
46
46
let jsonFilePath = flags [ 'coverage-json' ] ;
47
- const xmlFilePath = flags [ 'xml' ] ;
47
+ let xmlFilePath = flags [ 'xml' ] ;
48
48
const dxDirectory = flags [ 'dx-directory' ] ;
49
49
jsonFilePath = path . resolve ( jsonFilePath ) ;
50
+ xmlFilePath = path . resolve ( xmlFilePath ) ;
50
51
// Check if the JSON file exists
51
52
if ( ! fs . existsSync ( jsonFilePath ) ) {
52
53
this . error ( `JSON file does not exist: ${ jsonFilePath } ` ) ;
Original file line number Diff line number Diff line change
1
+ import * as path from 'node:path' ;
2
+
1
3
import { TestContext } from '@salesforce/core/lib/testSetup.js' ;
2
4
import { expect } from 'chai' ;
3
5
import { stubSfCommandUx } from '@salesforce/sf-plugins-core' ;
@@ -6,8 +8,10 @@ import TransformerTransform from '../../../src/commands/apex-code-coverage/trans
6
8
describe ( 'transform the code coverage json' , ( ) => {
7
9
const $$ = new TestContext ( ) ;
8
10
let sfCommandStubs : ReturnType < typeof stubSfCommandUx > ;
9
- const testJsonPath = 'test.json' ;
10
- const testXmlPath = 'coverage.xml' ;
11
+ let testJsonPath = 'test.json' ;
12
+ let testXmlPath = 'coverage.xml' ;
13
+ testJsonPath = path . resolve ( testJsonPath ) ;
14
+ testXmlPath = path . resolve ( testXmlPath ) ;
11
15
12
16
beforeEach ( ( ) => {
13
17
sfCommandStubs = stubSfCommandUx ( $$ . SANDBOX ) ;
You can’t perform that action at this time.
0 commit comments