All Downloads are FREE. Search and download functionalities are using the official Maven repository.

templates.javascript.AppTest.js Maven / Gradle / Ivy

There is a newer version: 3.0.0
Show newest version
var vertxTests = require('vertx_tests');
var vassert = require('vertx_assert');

var vertx = require('vertx');

var Yoke = require('yoke/Yoke');
var YokeTester = require('yoke/test/YokeTester');

// The test methods must begin with "test"

function testGetBase() {

    var yoke = new Yoke();
    // all resources are OK
    yoke.use(function (request) {
        request.response.end('OK');
    });

    new YokeTester(yoke).request('GET', '/', function(resp) {
        vassert.assertTrue(200 == resp.statusCode);
        vassert.testComplete();
    });
}

vertxTests.startTests(this);





© 2015 - 2024 Weber Informatics LLC | Privacy Policy