Jestjs Openlayers 6类型错误:URL.createObjectURL不是函数
我有一个问题,在我将openlayers从5.3.1更新到6.3.1之后,当我运行test、jest或mocha时,两者都显示错误“TypeError:URL.createObjectURL不是函数”,原因是什么 摩卡咖啡网页:Jestjs Openlayers 6类型错误:URL.createObjectURL不是函数,jestjs,openlayers-6,mocha-webpack,createobjecturl,Jestjs,Openlayers 6,Mocha Webpack,Createobjecturl,我有一个问题,在我将openlayers从5.3.1更新到6.3.1之后,当我运行test、jest或mocha时,两者都显示错误“TypeError:URL.createObjectURL不是函数”,原因是什么 摩卡咖啡网页: TypeError: URL.createObjectURL is not a function at eval (webpack:///./node_modules/ol/worker/webgl.js?:7:15) 笑话: 失败测试/map.test.js
TypeError: URL.createObjectURL is not a function
at eval (webpack:///./node_modules/ol/worker/webgl.js?:7:15)
笑话:
失败测试/map.test.js
● 测试套件无法运行
TypeError: URL.createObjectURL is not a function
> 1 | import {Vector as VectorLayer} from "ol/layer.js";
| ^
OpenLayers 6将WebGL用于热图层,并包含一个WebGL workers插件,该插件使用URL.createObjectURL来使用热图层,您需要在Jest中启用URL谢谢您的回答!OpenLayers 6将WebGL用于热图层,并包含一个WebGL workers插件,该插件使用URL.createObjectURL来使用热图层,您需要在Jest中启用URL谢谢您的回答!