Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

A mock for non-browser enviorments #6

Open
mcwhittemore opened this issue Jun 23, 2016 · 1 comment
Open

A mock for non-browser enviorments #6

mcwhittemore opened this issue Jun 23, 2016 · 1 comment

Comments

@mcwhittemore
Copy link
Contributor

When I started this lib there wasn't a known way to run mapbox-gl-js in a non-web-gl browser environment and so I had this mock only mock mapbox-gl-js functionality. Now that there is a solution for running mapbox-gl-js in a non-web-gl environment, should this mock look into being for Node.js only?

Some questions to answer.

  • Does it come with browser mocking?
  • Can we move away from mocking the mapbox-gl-js to mocking parts of the browser that mapbox-gl-js needs that aren't in normal browser mocks?
  • Are there more feature complete browser mocks than mock-browser that could render this unneeded with the mock-gl-context option?

/cc @davidtheclark @scothis

@scothis
Copy link
Contributor

scothis commented Jun 23, 2016

The WebGL mock you reference will only work for browsers. mapbox-gl-js should already be able to work headless with the node renderer, at least that's what the gl-js unit tests run with. The project will dynamically swaps in a browser implementation for the default node implemented as part of the browserify config.

There could still be an odd impedance mismatch if draw has a hard dependency on the DOM.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants