diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/add-methods-after-inheritance.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/add-methods-after-inheritance.english.md index bfb642ffbb..1d41bc5e6f 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/add-methods-after-inheritance.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/add-methods-after-inheritance.english.md @@ -58,7 +58,14 @@ tests: testString: assert(beagle instanceof Animal); - text: The constructor for beagle should be set to Dog. testString: assert(beagle.constructor === Dog); - + - text: beagle.eat() should log "nom nom nom" + testString: | + console.log = function(msg){throw msg;} + assert.throws(() => beagle.eat(),"nom nom nom"); + - text: beagle.bark() should log "Woof!" + testString: | + console.log = function(msg){throw msg;} + assert.throws(() => beagle.bark(),"Woof!"); ```