I wanted a simple typescript-based test and code runner in the browser itself.<p>After some research, I found out that we can run the mocha test in the browser, and there is a Monaco editor that can provide syntax highlight and auto-complete, So I decided to add in my Angular website that I am maintaining.<p>A little bit of my code is a trick to workaround for running tests, like when you run the test it will refresh, because I couldn't able to figure out how to clear the mocha run instance error. Let me know if you know of any workaround for this, The source code is Open Source.<p>I am maintaining a list of all small open-source tools I create here: <a href="https://www.visrut.fun/useful/small-tools" rel="nofollow">https://www.visrut.fun/useful/small-tools</a><p>Let me know what you think.<p>PS: Node.JS API won't work here because it's only for the browser, The idea was we could write simple logic on the left side and test it on the right side. Any kind of function or algorithm you want to write to submit on any competitive programming platform or Problem-solving platform using TypeScript.