Skip to content

Commit a5d6a42

Browse files
committed
Updated Datatime test
1 parent 987809a commit a5d6a42

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

src/danfojs-browser/tests/core/datetime.test.js

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,19 @@ describe("TimeSeries", function () {
9292
it("Returns date string in standard JS format", function () {
9393
const data = [ "02Sep2019", "03Aug2019", "04July2019" ];
9494
const dateTime = dfd.toDateTime(data);
95-
const expected = [ "2019-09-02", "2019-08-03", "2019-07-04" ];
95+
const expected = [
96+
'9/2/2019, 12:00:00 AM',
97+
'8/3/2019, 12:00:00 AM',
98+
'7/4/2019, 12:00:00 AM'
99+
];
96100

97-
const data2 = new Series([ "12.30.19", "12.22.19", "11.01.20" ]);
101+
const data2 = new dfd.Series([ "12.30.19", "12.22.19", "11.01.20" ]);
98102
const dateTime2 = dfd.toDateTime(data2);
99-
const expected2 = [ "2019-12-30", "2019-12-22", "2020-11-01" ];
100-
103+
const expected2 = [
104+
'12/30/2019, 12:00:00 AM',
105+
'12/22/2019, 12:00:00 AM',
106+
'11/1/2020, 12:00:00 AM'
107+
];
101108
assert.deepEqual(dateTime.date().values, expected);
102109
assert.deepEqual(dateTime2.date().values, expected2);
103110
});

0 commit comments

Comments
 (0)