You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The syncTests.ts and asyncTests.ts build test summary JSON with start times in local locale. Later, when using these summaries to generate a junit report, the Date constructor fails to construct a valid date, causing a failure at;
RangeError: Invalid time value
at Date.toISOString (<anonymous>)
at JUnitReporter.format (/Users/jpower/Code/sfpowerscripts/packages/core/node_modules/@salesforce/apex-node/src/reporters/junitReporter.ts:32:61)
Should the test summary just have an ISO date string for start time instead, given intention to programmatically parse again later in junit reporter?
Steps To Reproduce:
Setup machine to have a locale that will produce a date time string like: Sat Jul 22 2023 9:54:03 a.m. (like en-CA)
Run apex tests via apex-node
Use junit reporter to save results
Expected result
Expect correctly parsed date
Actual result
Error, invalid time value
Additional information
Apex library Version: "@salesforce/apex-node": "1.1.0" OS and version: Darwin TRAC-C02F314EML7L 22.5.0 Darwin Kernel Version 22.5.0: Thu Jun 8 22:22:22 PDT 2023; root:xnu-8796.121.3~7/RELEASE_X86_64 x86_64
The text was updated successfully, but these errors were encountered:
JonnyPower
added a commit
to Traction-Rec/salesforcedx-apex
that referenced
this issue
Jul 22, 2023
Summary
The
syncTests.ts
andasyncTests.ts
build test summary JSON with start times in local locale. Later, when using these summaries to generate a junit report, the Date constructor fails to construct a valid date, causing a failure at;Should the test summary just have an ISO date string for start time instead, given intention to programmatically parse again later in junit reporter?
Steps To Reproduce:
Sat Jul 22 2023 9:54:03 a.m.
(likeen-CA
)Expected result
Actual result
Additional information
Apex library Version: "@salesforce/apex-node": "1.1.0"
OS and version: Darwin TRAC-C02F314EML7L 22.5.0 Darwin Kernel Version 22.5.0: Thu Jun 8 22:22:22 PDT 2023; root:xnu-8796.121.3~7/RELEASE_X86_64 x86_64
The text was updated successfully, but these errors were encountered: