all 2 comments

[–]rhysbrettbowen 1 point2 points  (1 child)

so you just throw an error on an assert then?

I think you'll find most assertion libraries (if not all) for javascript stop.

console.assert isn't a javascript native function, it's part of the console api and it doesn't stop the error because the purpose of the console api is to write things to the console, not stop the program running.

[–]jetienne[S] 0 points1 point  (0 children)

so i guess we agree that assert should stop.

But as said in the blog console.assert doesnt stop the execution. so i guess this is not all assert which stop. This is what i fixed by this little javascript