JavaScript with Sinon for AJAX Testing: How to Wait for the Request to Complete before Execution Assertions?

November 25, 2016
In the Software University (SoftUni) we are developing a test automation system (online judge) for JavaScript code. It supports many languages and frameworks (C#, Java, JS, PHP, Python, SQL, C++, …). The interesting case now is with JS testing with Node.js. Students submit their JS code, the judge executes a few tests and responds with evaluation score (0…100):