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
When trying to bump our version of chrono-node our automated tests caught a change in behavior. After trying a few things it appears this is an unexpected regression and bug.
var chronoNode142 = require("chrono-node"); // version 1.4.2
var chronoNode1311 = require("chrono-node@1.3.11");
function testParse (chronoNode) {
var chrono = new chronoNode.Chrono();
var text = `
He will be leaving on July 28 2017 at 6:34pm.
I'm certain that I will be very sad once he leaves, around 07-28-17 18:35.
`;
var results = chrono.parse(text);
var singleResult = chrono.parse('07-28-17 18:35');
if (results[1].start.knownValues.year !== singleResult[0].start.knownValues.year) {
throw new Error('Unexpected results');
}
}
testParse(chronoNode1311);
console.log('Version 1.3.11 passed');
testParse(chronoNode142); // Exception thrown here
console.log('Version 1.4.2 passed');
The text was updated successfully, but these errors were encountered:
When trying to bump our version of
chrono-node
our automated tests caught a change in behavior. After trying a few things it appears this is an unexpected regression and bug.Link to repro in RunKit: https://runkit.com/dylanlingelbach/5e20a37b87a30d001bf04503
Code:
The text was updated successfully, but these errors were encountered: