-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
It'd be great if you exported CanvasPattern and CanvasGradient.
I have OpenLayers as a dependency. Internally, it's using CanvasPattern and CanvasGradient. I installed node-canvas for testing: I'm using mocha and jsdom to set a suitable DOM environment for the tests to run. So, in my tests configuration file I have something like:
const canvas = require('canvas');
// ...
global['CanvasRenderingContext2D'] = canvas.Context2d;
Now, some tests that use OpenLayers are failing because it is expecting CanvasPattern and CanvasGradient to be in the global scope.
I can see that you have such classes within your project but they are not public. Or maybe I don't know how to import/use them?
Environment
- [email protected]
- node v6.11.1 on Ubuntu 16.04.3 LTS
Metadata
Metadata
Assignees
Labels
No labels