File tree 4 files changed +6
-4
lines changed
src/commands/force/lightning/lwc/test
4 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -9,3 +9,4 @@ node_modules
9
9
oclif.manifest.json
10
10
oclif.lock
11
11
npm-shrinkwrap.json
12
+ .idea /
Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ export default class Run extends SfdxCommand {
55
55
const scriptRet = this . runJest ( args ) ;
56
56
57
57
this . ux . log ( messages . getMessage ( 'logSuccess' , [ scriptRet . status . toString ( ) ] ) ) ;
58
+ process . exitCode = scriptRet . status ;
58
59
return {
59
60
message : messages . getMessage ( 'logSuccess' , [ scriptRet . status . toString ( ) ] ) ,
60
61
jestExitCode : scriptRet . status ,
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ describe('lightning:lwc:test:run', () => {
81
81
await fs . promises . writeFile ( testPath , content ) ;
82
82
83
83
const output = execCmd < RunResult > ( 'force:lightning:lwc:test:run' , {
84
- ensureExitCode : 0 ,
84
+ ensureExitCode : 1 ,
85
85
} ) . shellOutput . stderr ;
86
86
expect ( output ) . to . include ( 'Test Suites: 1 failed' ) ;
87
87
expect ( output ) . to . include ( 'Tests: 1 failed' ) ;
Original file line number Diff line number Diff line change @@ -55,9 +55,9 @@ describe('lightning:lwc:test:setup', () => {
55
55
content = await fs . promises . readFile ( pjsonPath , 'utf-8' ) ;
56
56
const forceignoreContent = fs . readFileSync ( forceignorePath , 'utf-8' ) ;
57
57
expect ( forceignoreContent ) . to . include ( '**/__tests__/**' ) ;
58
- expect ( content ) . to . include ( '"test:unit": "sfdx-lwc-jest --skipApiVersionCheck "' ) ;
59
- expect ( content ) . to . include ( '"test:unit:coverage": "sfdx-lwc-jest --coverage --skipApiVersionCheck "' ) ;
60
- expect ( content ) . to . include ( '"test:unit:debug": "sfdx-lwc-jest --debug --skipApiVersionCheck "' ) ;
58
+ expect ( content ) . to . include ( '"test:unit": "sfdx-lwc-jest"' ) ;
59
+ expect ( content ) . to . include ( '"test:unit:coverage": "sfdx-lwc-jest --coverage "' ) ;
60
+ expect ( content ) . to . include ( '"test:unit:debug": "sfdx-lwc-jest --debug "' ) ;
61
61
expect ( content ) . to . include ( '"@salesforce/sfdx-lwc-jest": "^' ) ;
62
62
} ) ;
63
63
} ) ;
You can’t perform that action at this time.
0 commit comments