segment-integrations / analytics.js-integration-visual-website-optimizer

The Visual Website Optimizer analytics.js integration.
https://segment.com/docs/integrations/visual-website-optimizer/
MIT License
0 stars 2 forks source link

Add support for async VWO snippet #9

Closed ucarion closed 6 years ago

ucarion commented 6 years ago

The tests remain using only the "sync" mode, which is a lie anyway since it doesn't actually invoke VWO, which doesn't seem to work within tests anyhow.

This seems to work, based on manual testing -- the relevant global variables appear to all be present and with sensible values, and the integration does successfully call .ready().

codecov-io commented 6 years ago

Codecov Report

Merging #9 into master will decrease coverage by 10.76%. The diff coverage is 30%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master       #9       +/-   ##
===========================================
- Coverage     100%   89.23%   -10.77%     
===========================================
  Files           1        1               
  Lines          56       65        +9     
===========================================
+ Hits           56       58        +2     
- Misses          0        7        +7
Impacted Files Coverage Δ
lib/index.js 89.23% <30%> (-10.77%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update ae84d04...3371115. Read the comment docs.