【发布时间】:2020-08-08 01:32:34
【问题描述】:
Mocha 在我的基于 TypeScript 的代码上运行良好。但出乎意料的是,它开始表现得很奇怪。即使回滚到之前的提交也没有解决它。
该错误似乎在编译时弹出(因此与单元测试代码无关,而是 mocha 配置?)。 在这里……
在 polyfill.js 中:
Exception has occurred: TypeError
TypeError: Cannot add property 0, object is not extensible
at Function.assign (<anonymous>)
这是我的 VSCode launch.json:
{
"type": "node",
"request": "launch",
"name": "Mocha PD",
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
"args": ["-r", "ts-node/register", "--timeout", "999999", "--colors", "${workspaceFolder}/test/**/pipedrive*.test.ts"],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"protocol": "inspector"
}
【问题讨论】:
标签: typescript visual-studio-code mocha.js