在主代码上运行测试时 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/