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
While running the CTS, sometimes i get a failure like the following:
"tests": [
{
"title": "Special Data Types and Rules (Data 4.0)",
"name": "Special Data Types and Rules",
"requirement": [
"Data.md#4.0"
],
"log": "",
"status": "failed",
"tests": [
{
"title": "A Timestamp MUST preserve precision to at least milliseconds, 3 decimal points beyond seconds. (Data 4.5.s1.b3, XAPI-00122)",
"name": "A Timestamp MUST preserve precision to at least milliseconds, 3 decimal points beyond seconds.",
"requirement": [
"Data.md#4.5.s1.b3"
],
"log": "",
"status": "failed",
"tests": [
{
"title": "retrieve statements, test a stored property",
"name": "retrieve statements, test a stored property",
...
"status": "failed",
"error": "AssertionError: expected 0 to be above 0",
"tests": []
}
]
}
]
}
]
I believe this is caused by a failed expect in the .js file in the subject line inside the milliChecker function starting on line #470.
The failure seems to be caused by timestamps with a milliseconds field that have 0 as their last decimal digit.
The following code demonstrates the issue:
importmomentfrom'moment';importchaifrom'chai';varexpect=chai.expect;vartv=["2025-01-17T00:52:14.590+00:00","2008-09-15T15:53:00.601Z","2025-01-17T00:52:14.591+00:00","2008-09-15T15:53:00.600Z"];for(leti=0;i<tv.length;i++){try{varts=moment(tv[i],moment.ISO_8601);expect(ts.isValid()).to.be.true;varmillis=ts._pf.parsedDateParts[6];expect(isNaN(millis)).to.be.false;expect(millis%10).to.be.above(0);console.info(`+ TV #${i} (${millis}) pass`);}catch(x){console.error(`- TV #${i} (${millis}) fail: ${x.message}`);continue}}
It outputs:
- TV #0 (590) fail: expected 0 to be above 0
+ TV #1 (601) pass
+ TV #2 (591) pass
- TV #3 (600) fail: expected 0 to be above 0
Would appreciate it if somebody can confirm if it's indeed a bug or a misunderstanding on my part.
cheers;
rsn
The text was updated successfully, but these errors were encountered:
Hi there,
While running the CTS, sometimes i get a failure like the following:
I believe this is caused by a failed
expect
in the.js
file in the subject line inside themilliChecker
function starting on line #470.The failure seems to be caused by timestamps with a milliseconds field that have
0
as their last decimal digit.The following code demonstrates the issue:
It outputs:
Would appreciate it if somebody can confirm if it's indeed a bug or a misunderstanding on my part.
cheers;
rsn
The text was updated successfully, but these errors were encountered: