"use strict";
exports.__esModule = true;
var ava_1 = require("ava");
var src_1 = require("../src");
ava_1["default"]('validate() does not throw error for valid input.', function (t) {
    var validator = function (input) { return [input, function (v) { return typeof v === 'string'; }, 'error']; };
    t.notThrows(function () { return src_1.validate(validator('test')); }, 'validate() should not throw error for valid input.');
});
ava_1["default"]('validate() throws correct error for invalid input.', function (t) {
    var errorMessage = 'validation error';
    var validator = function (input) { return [input, function (v) { return false; }, errorMessage]; };
    var value = 'test';
    t.is(t.throws(function () { return src_1.validate(validator(value)); }, Error).message, errorMessage + ": " + JSON.stringify(value, null, 1), 'validate() should throw correct error for invalid input.');
});
//# sourceMappingURL=validate.test.js.map