Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jestjs Openlayers 6类型错误:URL.createObjectURL不是函数_Jestjs_Openlayers 6_Mocha Webpack_Createobjecturl - Fatal编程技术网

Jestjs Openlayers 6类型错误: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

我有一个问题,在我将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

> 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谢谢您的回答!