我正在尝试测试我的第一个区块链应用程序。这是我的代码
var Contest = artifacts.require("./Contest.sol");
contract("Contest",function(accounts){
//to check if getting initialized correctly
it("initializes with two contestants", function(){
return Contest.deployed().then(function(instance){
return instance.contestantsCount();
}).then(function(count){
assert.equal(count,2);
});
});
});
但我收到此错误:
TypeError [ERR_INVALID_REPL_INPUT] [ERR_INVALID_REPL_INPUT]: Listeners
for `uncaughtException` cannot be used in the REPL
环境
Operating System: Microsoft Windows
Truffle v5.0.2 (core: 5.0.2)
Solidity v0.5.0 (solc-js)
Node v14.17.1