Skip to content

Commit

Permalink
Merge pull request #48 from Snugug/hotfix/form-validate
Browse files Browse the repository at this point in the history
Fix form.validate being removed
  • Loading branch information
scottnath authored Jul 5, 2016
2 parents 0507c97 + 62d1511 commit 3e17bf9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
3 changes: 2 additions & 1 deletion lib/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

const html = require('./form/html');
const scripts = require('./form/scripts');
const validate = require('./form/validate');

// const css = require('./form/css');

Expand All @@ -22,4 +23,4 @@ const form = (type, errors) => {


module.exports = form;
module.exports.scripts = scripts;
module.exports.validate = validate;
11 changes: 9 additions & 2 deletions tests/all.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
import test from 'ava';
import types from '../';

test('Everything Ever', t => {
test('Main Export', t => {
t.is(typeof types, 'function', 'Content Types exports a function');

t.is(typeof types.raw, 'function', 'Submodule `raw` exists and is a function');
t.is(typeof types.only, 'function', 'Submodule `only` exists and is a function');
t.is(typeof types.form, 'function', 'Submodule `forms` exists and is a function');
});

test('Form Export', t => {
t.is(typeof types.form, 'function', 'Submodule `form` exists and is a function');
t.is(typeof types.form.validate, 'function', 'Submodule `form.validate` exists and is a function');
});

test('Plugin Test Export', t => {
t.is(typeof types.pluginTests, 'function', 'Submodule `pluginTests` exists and is a function');
});
2 changes: 1 addition & 1 deletion tests/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import includes from 'lodash/includes';
test('All Form Goodies', t => {
t.is(typeof form, 'function', 'Form exports a function');

t.is(typeof form.scripts, 'function', 'Submodule `scripts` exists and is a function');
t.is(typeof form.validate, 'function', 'Submodule `validate` exists and is a function');
});

test('Form Generation', t => {
Expand Down

0 comments on commit 3e17bf9

Please sign in to comment.