dimanche 27 novembre 2016

Running tests on code all on same webpage

I am working on a web application where on the page there are two text boxes/code editors: one for 'code', one for 'test code'. The point is for a user to click a button that says "run the tests", and have the code from the test code editor run against the code in the code editor, and for the results of tests to output on the screen. The point is to eventually end up with a code-wars for unit tests type application.

Thing is, I can't figure out the basic functionality of how to run the tests. I've only ever run tests by doing something like typing "npm test" in the terminal on my mac. I was thinking maybe using docker could work, but then I'm finding docker to be somewhat complicated.

Anyone have any basic tips on how I could, in a node.js -express-angular type web app run test code on other code that's coming from a couple of editors I've embeded into my web app?

Aucun commentaire:

Enregistrer un commentaire