Skip to content

Commit c293d10

Browse files
authored
Merge pull request #273 from salesforcecli/devScripts2023-11-05
refactor: devScripts update
2 parents ee16c0d + 3c45be6 commit c293d10

File tree

4 files changed

+188
-216
lines changed

4 files changed

+188
-216
lines changed

package.json

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,37 +16,17 @@
1616
"devDependencies": {
1717
"@oclif/plugin-command-snapshot": "^4.0.16",
1818
"@salesforce/cli-plugins-testkit": "^4.4.10",
19-
"@salesforce/dev-config": "^4.1.0",
20-
"@salesforce/dev-scripts": "^5.12.2",
19+
"@salesforce/dev-scripts": "^6.0.3",
2120
"@salesforce/plugin-command-reference": "^3.0.45",
2221
"@salesforce/plugin-deploy-retrieve": "^1.19.0",
23-
"@salesforce/prettier-config": "^0.0.3",
2422
"@salesforce/ts-sinon": "^1.4.17",
2523
"@salesforce/ts-types": "^2.0.7",
2624
"@swc/core": "1.3.30",
27-
"@typescript-eslint/eslint-plugin": "^5.62.0",
28-
"@typescript-eslint/parser": "^5.62.0",
29-
"chai": "^4.3.10",
30-
"eslint": "^8.53.0",
31-
"eslint-config-prettier": "^8.10.0",
32-
"eslint-config-salesforce": "^2.0.2",
33-
"eslint-config-salesforce-license": "^0.2.0",
34-
"eslint-config-salesforce-typescript": "^2.0.0",
35-
"eslint-plugin-header": "^3.1.1",
36-
"eslint-plugin-import": "^2.29.0",
37-
"eslint-plugin-jsdoc": "^46.8.2",
3825
"eslint-plugin-sf-plugin": "^1.16.12",
39-
"husky": "^7.0.4",
40-
"mocha": "^9.1.3",
41-
"nyc": "^15.1.0",
4226
"oclif": "^3.17.2",
43-
"prettier": "^2.8.8",
44-
"pretty-quick": "^3.1.0",
4527
"shx": "^0.3.4",
46-
"sinon": "10.0.0",
47-
"ts-node": "^10.0.0",
48-
"typescript": "^5.2.2",
49-
"wireit": "^0.14.1"
28+
"ts-node": "^10.9.1",
29+
"typescript": "^5.2.2"
5030
},
5131
"engines": {
5232
"node": ">=16.0.0"

src/commands/apex/run/test.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,18 +234,22 @@ const validateFlags = async (
234234
synchronous?: boolean,
235235
testLevel?: TestLevel
236236
): Promise<TestLevel> => {
237-
if (synchronous && (suiteNames || (classNames?.length && classNames.length > 1))) {
237+
if (synchronous && (Boolean(suiteNames) || (classNames?.length && classNames.length > 1))) {
238238
return Promise.reject(new Error(messages.getMessage('syncClassErr')));
239239
}
240240

241-
if ((tests || classNames || suiteNames) && testLevel && testLevel !== 'RunSpecifiedTests') {
241+
if (
242+
(Boolean(tests) || Boolean(classNames) || suiteNames) &&
243+
testLevel &&
244+
testLevel.toString() !== 'RunSpecifiedTests'
245+
) {
242246
return Promise.reject(new Error(messages.getMessage('testLevelErr')));
243247
}
244248

245249
if (testLevel) {
246250
return testLevel;
247251
}
248-
if (classNames || suiteNames || tests) {
252+
if (Boolean(classNames) || Boolean(suiteNames) || tests) {
249253
return TestLevel.RunSpecifiedTests;
250254
}
251255
return TestLevel.RunLocalTests;

src/reporters/testReporter.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
66
*/
77
import {
8-
ApexTestRunResultStatus,
98
HumanReporter,
109
JUnitReporter,
1110
OutputDirConfig,
@@ -64,7 +63,7 @@ export class TestReporter {
6463
}
6564

6665
try {
67-
if (result.summary && result.summary.outcome === ApexTestRunResultStatus.Failed) {
66+
if (result.summary && result.summary.outcome === 'Failed') {
6867
process.exitCode = FAILURE_EXIT_CODE;
6968
}
7069
switch (options['result-format']) {

0 commit comments

Comments
 (0)