question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How Should I Throw?

See original GitHub issue

I tried to write should.js style throw statements like so (new Bill(input)).should.throw(Error); but its not working. Where can I find resources wherein I can checkout documentation on should assertion style?

Issue Analytics

  • State:closed
  • Created 11 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

19reactions
logicalparadoxcommented, Jun 2, 2012

Try this…

(function () {
  new Bill(input);
}).should.throw(Error);
6reactions
meebercommented, Apr 15, 2016

@sabrinaluo Try using .should.throw() and .should.not.throw() (with parenthesis).

You might also want to consider using throw Error('NOT A NUMBER') or even throw TypeError('NOT A NUMBER') in your class so that the stack is captured, though I don’t think this is directly related to your issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Throw Darts (with Pictures) - wikiHow
Stand with your feet hip width apart behind the throw line. The throw line, also called the oche, cannot be stepped over at...
Read more >
How to throw | Introduction to darts - DARTSLIVE
Stand completely sideways to the dart board ... The front feet is placed on the throw line for this stance, this make it...
Read more >
How to Throw Darts: Technique, Grip, Stance and Release
Aim and Direct: The chief objective of your grip should be to keep the end of the dart pointing up in each throwing...
Read more >
How to Throw Darts Consistently - Bar Games 101
The first step in becoming a consistent darts thrower is learning how to properly hold the dart. To throw an accurate dart, you...
Read more >
How To Throw Darts With Precision | DartHelp.com
To throw a dart with precision, you must keep your elbow up and eye on the target. Your upper arm should not move...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found