From 2af926551a51b61426056c9cdbf6c73bb398f3d9 Mon Sep 17 00:00:00 2001 From: Justin Holdstock Date: Fri, 16 Mar 2018 15:32:57 -0600 Subject: [PATCH 1/2] Chore: Updating to use correct property name --- src/lib/Preview.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/Preview.js b/src/lib/Preview.js index 35e21ddbb..60ecd8e32 100644 --- a/src/lib/Preview.js +++ b/src/lib/Preview.js @@ -1196,7 +1196,7 @@ class Preview extends EventEmitter { // Explicit preview failure this.handleViewerMetrics({ - event_name: 'failure' + event: 'failure' }); // Hookup for phantom JS health check @@ -1216,7 +1216,7 @@ class Preview extends EventEmitter { // Explicit preview success this.handleViewerMetrics({ - event_name: 'success' + event: 'success' }); // If there wasn't an error and event logging is not disabled, use Events API to log a preview From 165b19284200bebd5773717df2f3d5697f26c7c6 Mon Sep 17 00:00:00 2001 From: Justin Holdstock Date: Fri, 16 Mar 2018 15:46:35 -0600 Subject: [PATCH 2/2] Chore: update tests --- src/lib/__tests__/Preview-test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/__tests__/Preview-test.js b/src/lib/__tests__/Preview-test.js index 02c0e4f31..fdb59fe36 100644 --- a/src/lib/__tests__/Preview-test.js +++ b/src/lib/__tests__/Preview-test.js @@ -1745,7 +1745,7 @@ describe('lib/Preview', () => { preview.finishLoading(); - expect(handleViewerMetrics).to.be.calledWith({ event_name }); + expect(handleViewerMetrics).to.be.calledWith({ event: event_name }); }); it('should emit a metrics message for failed preview', () => { @@ -1756,7 +1756,7 @@ describe('lib/Preview', () => { preview.finishLoading({ error: {} }); - expect(handleViewerMetrics).to.be.calledWith({ event_name }); + expect(handleViewerMetrics).to.be.calledWith({ event: event_name }); }); it('should emit the load event', () => {