Comments (2)
Er, should it even be trace.fun
? Looking at stack-trace, it seems trace.getFunction()
would be the right way? If that works, would you mind filing a PR?
from insist.
That does not work. I was about to file a PR, when I tested this in the console. Using let
is doing something to the CallSite object, not sure what, but it does not matter if substituting fun
for getFunction()
. I tried ... Substituting let
for var
in the example will run just fine, btw.
This bug only manifests itself in the REPL btw, so to test it one can do this:
$ iojs --use-strict -i << EOF
> let assert = require('./insist');
> assert.equal(3, 4);
> let assert = require('./insist');
undefined
> assert.equal(3, 4);
TypeError: Cannot read property 'toString' of undefined
at getMessage (/Users/carl-erik.kopseng/dev-priv/insist/insist.js:84:31)
at Function.insist [as equal] (/Users/carl-erik.kopseng/dev-priv/insist/insist.js:99:22)
at repl:1:8
at REPLServer.defaultEval (repl.js:164:27)
at bound (domain.js:250:14)
at REPLServer.runBound [as eval] (domain.js:263:12)
at REPLServer.<anonymous> (repl.js:392:12)
at emitOne (events.js:82:20)
at REPLServer.emit (events.js:169:7)
at REPLServer.Interface._onLine (readline.js:210:10)
>
I see that better-assert
does this fine, so maybe a fix could be to use tj/callsite like it does? Might change the look of the stacktraces, though.
from insist.
Related Issues (2)
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 insist.