Python test Mocha

I was pleasantly surprised to find that pyinvoke code worked perfectly for running some tests for me. This will make my CI testing more complete.

from django.test import SimpleTestCase
from invoke import run


class JavascriptTestCase(SimpleTestCase):

    def testWithMocha(self):
        return run("cd node-app && mocha")

 

The output of failure is a little verbose, but at least I’ll know there is a problem without having to specifically run my javascript tests.

Advertisements