Comments (6)
@MrChico What can I do to convince you to try out ethereumjs-testrpc?
from truffle.
Haha, I have actually moved to the js testrpc now. You underestimate your manipulative powers @tcoulter
from truffle.
I think this one is related, please consider the following example:
contract('Tester', function(accounts) {
it('should fail', function(done) {
(new Promise(function(_rs, _rj) {
setTimeout(function() { throw 'error'; }, 1);
})).then(done).catch(done)
});
it('should be pending');
});
It results in a crash on first test, and never gets to the second.
Contract: MultiAccessTester
/usr/lib/node_modules/truffle/node_modules/solc/bin/soljson-latest.js:1
(function (exports, require, module, __filename, __dirname) { var Module;if(!Module)Module=(typeof Module!=="undefined"?Module:null)||{};var moduleOverrides={};for(var key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var ENVIRONMENT_IS_WEB=typeof window==="object";var ENVIRONMENT_IS_WORKER=typeof importScripts==="function";var ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof require==="function"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER;var ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE){if(!Module["print"])Module["print"]=function print(x){process["stdout"].write(x+"\n")};if(!Module["printErr"])Module["printErr"]=function printErr(x){process["stderr"].write(x+"\n")};var nodeFS=require("fs");var nodePath=require("path");Module["read"]=function read(filename,binary){filename=nodePath["normalize"](filename);var ret=nodeFS["readFileSync"](
error
The same suite
describe('Tester', function(accounts) {
it('should fail', function(done) {
(new Promise(function(_rs, _rj) {
setTimeout(function() { throw 'error'; }, 1);
})).then(done).catch(done)
});
it('should be pending');
});
is handled properly in mocha though:
MultiAccessTester
1) should emit Called event
- should be pending emit Called event
0 passing (11ms)
1 pending
1 failing
1) MultiAccessTester should emit Called event:
Error: the string "error" was thrown, throw an Error :)
from truffle.
Hi @lastperson - Can you output more information about the first error message? Unfortunately the solc package likes to gobble all unhandled errors and then rethrow them. What you're seeing in the above error is the point in the code where the error is rethrown; however, you're not including the stack trace that follows it. Can you give me that stack trace? Thanks - that'll help me better understand the issue.
from truffle.
Hi @tcoulter , thanks for quick reply. The problem is that this is the only output I get. Terminal prompt line appears right after the error word.
from truffle.
Hey there. I'm going to close this issue because it's so old, and Truffle has been significantly revamped since then. If you're still having issues, don't hesitate to ask in the [Truffle Gitter}(https://gitter.im/ConsenSys/truffle) or file a new ticket. Thanks!
from truffle.
Related Issues (20)
- Still using node-ipc instead of the fork HOT 4
- Truffle should have global technical support Channel to access for more contribution.
- Truffle migrate throwing Error "*** stack smashing detected ***: terminated" HOT 1
- TypeError: Cannot read properties of undefined (reading 'start') - Transaction that creates ERC20 contract HOT 7
- An error occurred while initializing the debugger. HOT 2
- Debugger shows incorrect value for a Yul variable HOT 4
- Client network socket disconnected before secure TLS connection was established HOT 2
- Running the command: npm install -g truffle generated error HOT 2
- adjusting to rpc limits HOT 2
- unbox failed,Error connecting to https://raw.githubusercontent.com/xxx HOT 2
- `truffle test --debug` hangs without starting the debugger HOT 5
- truffle test The following information will appear Download xxx HOT 5
- getting this error any solutions? HOT 1
- Error when running npm install -g truffle HOT 8
- "Upfront cost exceeds account balance" on Besu private zero gas network HOT 3
- receipt.to showing contract address HOT 2
- Truffle Compile SyntaxError HOT 1
- Issue using latest truffle migrate HOT 4
- Truffle is being sunset HOT 3
- "Everything is up to date, there is nothing to compile"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from truffle.