summaryrefslogtreecommitdiffstats
path: root/test/utils/DateTimeChartUtil.test.js
diff options
context:
space:
mode:
authorJames Forsyth <jf2512@att.com>2018-09-07 17:32:30 +0000
committerGerrit Code Review <gerrit@onap.org>2018-09-07 17:32:30 +0000
commitd1975c8134f0401b0ccebf3719eda129d53dac14 (patch)
treef8a8b6a314e2facf115a0c2015ba1ff84d518dbe /test/utils/DateTimeChartUtil.test.js
parent6b408bc2ea74ffbe3985c7f90211e59a2f00fad2 (diff)
parent197b38833b6172d67e13501633ff983579e7f99e (diff)
Merge "Fix failed tests"
Diffstat (limited to 'test/utils/DateTimeChartUtil.test.js')
-rw-r--r--test/utils/DateTimeChartUtil.test.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/utils/DateTimeChartUtil.test.js b/test/utils/DateTimeChartUtil.test.js
index 3f7be00..4f2b181 100644
--- a/test/utils/DateTimeChartUtil.test.js
+++ b/test/utils/DateTimeChartUtil.test.js
@@ -37,7 +37,7 @@ describe('DateTimeChartUtil Tests', () => {
it('getTicks', () => {
const timestamps = [
- {timestamp: 1521691200000, date: 'Thu, 22 Mar 2018 04:00:00 GMT'},
+ {timestamp: 1521604800000, date: 'Thu, 21 Mar 2018 04:00:00 GMT'},
{timestamp: 1521777600000, date: 'Thu, 23 Mar 2018 04:00:00 GMT'},
{timestamp: 1521950400000, date: 'Thu, 25 Mar 2018 04:00:00 GMT'},
{timestamp: 1522296000000, date: 'Thu, 29 Mar 2018 04:00:00 GMT'}
@@ -55,7 +55,7 @@ describe('DateTimeChartUtil Tests', () => {
it('getTicksData', () => {
const timestamps = [
- {timestamp: 1521691200000, date: 'Thu, 22 Mar 2018 04:00:00 GMT'},
+ {timestamp: 1521604800000, date: 'Thu, 21 Mar 2018 04:00:00 GMT'},
{timestamp: 1521777600000, date: 'Thu, 23 Mar 2018 04:00:00 GMT'},
{timestamp: 1521950400000, date: 'Thu, 25 Mar 2018 04:00:00 GMT'},
{timestamp: 1522296000000, date: 'Thu, 29 Mar 2018 04:00:00 GMT'}
@@ -64,9 +64,9 @@ describe('DateTimeChartUtil Tests', () => {
let mergedData = getTicksData(timestamps, ticksPerDay, 'timestamp');
// expect original 4 objects plus 4 additional objects for the missing days
// (4 additional objects will only have timestamp attribute, no date attribute)
- expect(mergedData.length).toBe(8);
- expect(mergedData[0]['timestamp']).toBe(1521691200000);
- expect(mergedData[0]['date']).toBe('Thu, 22 Mar 2018 04:00:00 GMT');
+ expect(mergedData.length).toBe(12);
+ expect(mergedData[0]['timestamp']).toBe(1521604800000);
+ expect(mergedData[0]['date']).toBe('Thu, 21 Mar 2018 04:00:00 GMT');
expect(mergedData[1]['timestamp']).toBe(1521777600000);
expect(mergedData[1]['date']).toBe('Thu, 23 Mar 2018 04:00:00 GMT');
expect(mergedData[2]['timestamp']).toBe(1521950400000);