Mapbox-gl-js: Test interaction handlers, UI controls, and browser utilities

Created on 24 Sep 2015  路  5Comments  路  Source: mapbox/mapbox-gl-js

Figure out how to test our event handling and interaction modules.

testing

Most helpful comment

JSDom. Pro: likely less unpredictability / hard-to-debug timing issues than a browser environment. Con: likely lower fidelity event implementation.

At this point in time, I would vote for this particular tradeoff. I think it would be the quickest way to get started and I'm betting a large majority of these tests would not require a super high fidelity event environment. (E.g. #2972 )

All 5 comments

Possible approaches:

  • JSDom. Pro: likely less unpredictability / hard-to-debug timing issues than a browser environment. Con: likely lower fidelity event implementation.
  • Reintroduce real-browser test suite using smokestack. Pro: higher fidelity. Con: https://twitter.com/tmcw/status/646345048142032896
  • Selenium?

screen_shot_2016-03-10_at_5 47 58_pm_1024

JSDom. Pro: likely less unpredictability / hard-to-debug timing issues than a browser environment. Con: likely lower fidelity event implementation.

At this point in time, I would vote for this particular tradeoff. I think it would be the quickest way to get started and I'm betting a large majority of these tests would not require a super high fidelity event environment. (E.g. #2972 )

+ browser utilities (i.e. js/util/browser/*.js) 馃槃

We've been gradually filling these out.

Was this page helpful?
0 / 5 - 0 ratings