When my markdown previewer first loads - Tests issue

Hey there!

I am trying to do the markdown previewer without framework, seems that it is working but when I run the test the first time it returns the error:

6. When my markdown previewer first loads, the default markdown in the #editor field should be rendered as HTML in the #preview element

If run the test again (without reload) all turns green! There is anything to solve this issue? The code is here: https://codepen.io/elschilling/pen/LYWJRBK

Thanks!

Hey,
If I run handleInput in window.onload() //when page is fully loaded or DOMContentLoaded tests pass on the first run

note! declaring variables without var/let/const : placeholder='some text' is a bad practice

1 Like

Gotcha! Appreciate the fast support! FCC community is amazing! Kudos @Annestezia !!

1 Like