tsUnit 1.1.3

Rating: No reviews yet
Downloads: 342
Change Set: 106830
Released: Oct 17, 2014
Updated: Oct 17, 2014 by Sohnee
Dev status: Stable Help Icon

Recommended Download

Source Code tsUnit.ts
source code, 19K, uploaded Oct 17, 2014 - 342 downloads

Release Notes

Includes parametrized tests, for example:

    export class ParameterizedTests extends tsUnit.TestClass {
        constructor() {
            super();

            this.parameterizeUnitTest(this.sumTests, [
                [1, 1, 2],
                [2, 3, 5],
                [4, 5, 9]
            ]);

            this.parameterizeUnitTest(this.nonSumTests, [
                [1, 1, 1],
                [4, 5, 1]
            ]);
        }

        sumTests(a: number, b: number, sum: number) {
            var c = a + b;
            this.areIdentical(c, sum);
        }

        nonSumTests(a: number, b: number, notsum: number) {
            var c = a + b;
            this.areNotIdentical(c, notsum);
        }

        normalTest() {
            this.isTrue(true);
        }
    }

Reviews for this release

No reviews yet for this release.