summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Thomas <steve.thomas@amdocs.com>2018-09-14 15:16:28 -0400
committerSteven Thomas <steve.thomas@amdocs.com>2018-09-14 15:16:47 -0400
commit17ccebdd4b886ce3e2db145633cf6aa61f544695 (patch)
tree3c50508c2c8eb7f2376b63863a8dae1c98956459
parent96319fec0d2af2be5802a56d6b05a3ada939c8df (diff)
small tweaks to test code to get it to work
Issue-ID: AAI-1599 Change-Id: I41ca44fb7ebecb9856867addc9e30d742a5e4abe Signed-off-by: Steven Thomas <steve.thomas@amdocs.com>
-rw-r--r--package.json10
-rw-r--r--src/app/MainScreenHeader.jsx5
-rw-r--r--test/utils/DateTimeChartUtil.test.js4
3 files changed, 10 insertions, 9 deletions
diff --git a/package.json b/package.json
index 898e70e..c35db74 100644
--- a/package.json
+++ b/package.json
@@ -114,6 +114,7 @@
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/test/fileMock.js",
"\\.(css|scss)$": "<rootDir>/test/styleMock.js"
},
+ "testURL": "http://localhost",
"moduleFileExtensions": [
"js",
"jsx"
@@ -131,10 +132,11 @@
"!**/resources/**",
"!**/dist/**",
"!**/scripts/**",
- "!**/gulpfile.js/**",
- "!**/karma.conf.js/**",
- "!**/webpack.config.js/**",
- "!**/webpack.devConfig.js/**",
+ "!**/gulpfile.js",
+ "!**/karma.conf.js",
+ "!**/webpack.config.js",
+ "!**/webpack.devConfig.js",
+ "!**/coverage/**",
"!**/tools/**"
]
},
diff --git a/src/app/MainScreenHeader.jsx b/src/app/MainScreenHeader.jsx
index 8c5e13d..1a39bc4 100644
--- a/src/app/MainScreenHeader.jsx
+++ b/src/app/MainScreenHeader.jsx
@@ -234,9 +234,8 @@ class MainScreenHeader extends Component {
if(this.props.subscriptionEnabled) {
var $this = this;
window.removeEventListener('message', function (e) {
- $this.receiveMessage(e, $this);
- }
- );
+ $this.receiveMessage(e, $this);
+ });
}
}
diff --git a/test/utils/DateTimeChartUtil.test.js b/test/utils/DateTimeChartUtil.test.js
index 4f2b181..47345f5 100644
--- a/test/utils/DateTimeChartUtil.test.js
+++ b/test/utils/DateTimeChartUtil.test.js
@@ -44,7 +44,7 @@ describe('DateTimeChartUtil Tests', () => {
];
let ticksPerDay = getTicks(timestamps, 'timestamp');
// expect 1 tick (timestamp) for each day between March 22 - March 29
- expect(ticksPerDay.length).toBe(8);
+ expect(ticksPerDay.length).toBe(9);
});
it('getTicks - empty data', () => {
@@ -64,7 +64,7 @@ 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(12);
+ expect(mergedData.length).toBe(9);
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);