Skip to content

Commit aa25a14

Browse files
authored
Handle undefined DiagnosticRecord (#27)
* Handle optional chaining for DiagnosticRecord * fix * update version
1 parent 886bc97 commit aa25a14

3 files changed

Lines changed: 71 additions & 71 deletions

File tree

package-lock.json

Lines changed: 69 additions & 69 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "common-utils",
33
"author": "The MathWorks, Inc.",
4-
"version": "2.2.1",
4+
"version": "2.2.0",
55
"description": "",
66
"type": "module",
77
"main": "lib/index.js",

src/testResultsSummary.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ function processTestCase(
337337
Name: testCaseName,
338338
Duration: Number(testResult.Duration.toFixed(2)),
339339
Status: determineTestStatus(testResult),
340-
Diagnostics: processDiagnostics(testResult.Details.DiagnosticRecord),
340+
Diagnostics: processDiagnostics(testResult.Details?.DiagnosticRecord),
341341
};
342342

343343
testFile.TestCases.push(testCase);

0 commit comments

Comments
 (0)