JSFiddle - React, Tailwind, and code Playground

HTML

<link rel="stylesheet" href="http://code.jquery.com/qunit/git/qunit.css">
<script src="http://code.jquery.com/qunit/git/qunit.js"></script>
<script src="http://sinonjs.org/releases/sinon-1.2.0.js"></script>
<script src="http://sinonjs.org/releases/sinon-qunit-1.0.0.js"></script>
<html>
    <head>
        <title>qUnit - Sinon.JS</title>       
    </head>
    <body>
        <h1 id="qunit-header">QUnit example</h1>
        <h2 id="qunit-banner"></h2>
        <div id="qunit-testrunner-toolbar"></div>
        <h2 id="qunit-userAgent"></h2>
        <ol id="qunit-tests"></ol>
        <div id="qunit-fixture">test markup, will be hidden</div>
    </body>
</html>

JavaScript

//diese Funktion ist zum Testen im Unit Test, hat nix mit dem Unit Test zu tun
function calc(a, b, func) {
    if (typeof(a) == 'number' && typeof(b) == 'number' && func && func.length == 3) {
        var erg = 0;
        if ($.inArray(func, ['add', 'sub', 'div', 'mul']) != -1) {
            switch (func) {
            case 'add':
                erg = a + b;
                break;
            case 'sub':
                erg = a - b;
                break;
            case 'div':
                if (b === 0) {
                    alert('division durch 0 nicht möglich');
                    return false;
                }
                else {
                    erg = a / b;
                }
                break;
            case 'mul':
                erg = a * b;
                break;
            }
            return erg;
        }
        else {
            return false;
        }
    }
    else {
        return false;
    }
}
//Test mit lokaler Javascript Berechnungs Funktion
module('TestModul-A', {
    setup: function() {},
    teardown: function() {}
});
//Grundfunktionalität
test('0', function() {
    ok(!calc(), 'ohne Parameter');
    ok(!calc(5), 'nur ein Parameter');
    ok(!calc(5, 6), 'nur zwei Parameter');
    ok(!calc('drei', 6, 'add'), 'Paramter 1 ist keine Zahl');
    ok(!calc(3, 'sieben', 'div'), 'Paramter 2 ist keine Zahl');
    ok(!calc(3, 7, 'eat'), 'Paramter 3 ist fehlerhaft');
    ok(!calc(3, 7, 'pizza'), 'Paramter 3 ist fehlerhaft');
});
//Add Test
test('1', function() {
    equal(calc(1, 3, 'add'), 4, '1 + 3 = 4');
    equal(calc(1, -3, 'add'), -2, '1 + -3 = -2');
    equal(calc(1, 0, 'add'), 1, '1 + -0 = 1');
});
//Sub Test
test('2', function() {
    equal(calc(3, 1, 'sub'), 2, '3 - 1 = 2');
    equal(calc(1, -3, 'sub'), 4, '1 - -3 = 2');
    equal(calc(1, 0, 'sub'), 1, '1 - 0 = 1');
});
//Mul Test
test('3', function() {
    equal(calc(1, 3, 'mul'), 3, '1 * 3 = 3');
    equal(calc(2, -3, 'mul'), -6, '2 * -3 = -6');
    equal(calc(2,...