To be able to run the tests, please install vowsvows-website.

You can easily write your own tests. Create a folder called myapp/test and create a file called myapp/test/math-test.js.

require('./../../core');

var vows = require("vows");
var assert = require("assert");

vows.describe("math").addBatch({

    "Math for beginners": {

        'topic': function() {
            bootstrap_manager.whenLoaded(this.callback);
        },

        onePlusTwo: function() {
            assert.equal(1 + 2, 3);
            assert.equal(2 + 1, 3);
        },

        thisWillFail: function() {
            assert.equal(1, 2);
        }
    }

}).export(module);

If you run now:

$ ant test

your tests will get executed. One failed and another one successful.

You can also generate a junit-like xml file for your tests, be calling:

$ ant test-xml

The result may be found at myapp/build/test_results.xml and can be integrated into a continuous integration environment (like hudson).

If you want to test if spludo-core works as expected, you have to use the ant build tool and type:

$ ant core-test

This will run the spludo core tests and output the results. Everything should work fine!

Comments