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.

Add test to Set the child prototype... challenge to check for correct output

See original GitHub issue

We could try and add an additional test that would make sure beagle.eat() logs “nom nom nom” to the console

Originally posted by @RandellDawson here

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
ojeytonwilliamscommented, Mar 12, 2020

Do you mind if I push this or will you do that?

Not at all, go for it!

1reaction
ojeytonwilliamscommented, Mar 12, 2020

@hassaanp that’s almost right and it’s a neat approach. I played with it for a bit and came up with:

  - text: <code>beagle.eat()</code> should log <code>"nom nom nom"</code>
    testString: |
      console.log = function(msg){throw msg;}
      assert.throws(() => beagle.eat(),"nom nom nom");

Since each test is isolated, there’s no need to restore the original console.log.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Component testing scenarios - Angular
As minimal as this is, you decide to add a test to confirm that component actually displays the right content where you think...
Read more >
Testing Components with children - Testing Angular
An integration test of HomeComponent renders the child Components. The host elements are filled with the output of CounterComponent , ...
Read more >
How to Conduct Usability Testing in Six Steps - Toptal
To go through the proper user testing process you need to do the following: Create a prototype; Come up with a test plan;...
Read more >
How to Write Test Cases: The Ultimate Guide with Examples
A test case is a set of instructions on “HOW” to validate a particular test objective/target, which, when followed will tell us if...
Read more >
Check for Children Sum Property in a Binary Tree
Given a binary tree, the task is to check for every node, its value is equal to the sum of values of its...
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