javascript - 如何构建 Fabric.js 进行单元测试

标签 javascript fabricjs

在主代码上运行测试时 npm test 工作正常, 但是当我在本地构建 Fabric 时(使用 node build.js module=ALL) 测试因错误而中断:

{ [Error: Cannot read property 'navigator' of undefined] message: 'Cannot read property \'navigator\' of undefined' }

即使没有对代码库进行任何更改。我想我缺少一些构建标志。

最佳答案

试试这个:node build.js module=ALL except=gestures,cufon,json minifier=uglifyjs

关于javascript - 如何构建 Fabric.js 进行单元测试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24349979/

相关文章:

javascript - 设置可拖动div的位置

javascript - 计算和删除 JSON 数据

javascript - Fabric.js 对象大小

image - Fabric .js : How to make an image in the shape of a circle with white borders

javascript - 如何将div字段动态添加到html页面中?

javascript - 如何在另一个函数中停止一个函数

javascript - 如何更新 SVG 文本并保持对齐?

jquery - Fabricjs Youtube 视频

javascript - 为什么 Array.prototype.slice(arguments, 2) 而不是初始化为空数组?

javascript - 如何使用 jquery 在多个选择框之间传递值