poorejc commented on issue #50:
URL: 
https://github.com/apache/incubator-flagon-useralejs/issues/50#issuecomment-815408726


   Great info, @UncleGedd. I’ll try testing it again with your parameters ASAP. 
Thanks again!
   
   > On Apr 6, 2021, at 4:45 PM, UncleGedd ***@***.***> wrote:
   > 
   > 
   > Also, you mentioned a sendNavigator unit test, will this suffice?
   > 
   >     it('sends logs on page exit with navigator', () => {
   >         const html = `<html><head></head><body></body></html>`;
   >         new JSDOM(html)
   >         const originalNavigator = global.navigator;
   >         let called = false;
   >         global.navigator = {
   >             sendBeacon: () => {
   >                 called = true;
   >             },
   >         };
   > 
   >         sendOnClose([{foo: 'bar'}], {on: true, url: 'test'});
   >         Object.defineProperty(global.document, 'visibilityState', {
   >             get: () => 'hidden'
   >         })
   >         global.document.dispatchEvent(new Event('visibilitychange'))
   > 
   >         global.navigator = originalNavigator
   >         expect(called).to.equal(true);
   >     });
   > —
   > You are receiving this because you were mentioned.
   > Reply to this email directly, view it on GitHub 
<https://github.com/apache/incubator-flagon-useralejs/issues/50#issuecomment-814427806>,
 or unsubscribe 
<https://github.com/notifications/unsubscribe-auth/AC474BSXS6OT4IWCHOHBMDDTHNXFZANCNFSM4Y2SOMLA>.
   > 
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to