Skip to content

Commit

Permalink
chore(forms): collocate tests with sources
Browse files Browse the repository at this point in the history
  • Loading branch information
henri-hulski committed Oct 24, 2016
1 parent 0d29f59 commit 4fc2013
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 11 deletions.
9 changes: 8 additions & 1 deletion packages/cerebral-forms/.babelrc
@@ -1,3 +1,10 @@
{
"presets": ["es2015"]
"presets": ["es2015"],
"env": {
"production": {
"ignore": [
"**/*.test.js"
]
}
}
}
2 changes: 1 addition & 1 deletion packages/cerebral-forms/package.json
Expand Up @@ -4,7 +4,7 @@
"description": "Signals, actions and state factories to create forms",
"main": "lib/index.js",
"scripts": {
"test": "../../node_modules/.bin/mocha --compilers js:../../node_modules/babel-register 'tests/**/*.js'",
"test": "../../node_modules/.bin/mocha --compilers js:../../node_modules/babel-register 'src/**/*.test.js'",
"test:watch": "npm run test -- --watch",
"prebuild": "npm run test",
"build": "BABEL_ENV=production ../../node_modules/.bin/babel src/ --out-dir=lib/ -s",
Expand Down
@@ -1,6 +1,6 @@
/* eslint-env mocha */
import {Controller} from 'cerebral'
import {form, resetForm, changeField} from '../src'
import {form, resetForm, changeField} from '..'
import assert from 'assert'

describe('resetForm', () => {
Expand Down
@@ -1,7 +1,7 @@
/* eslint-env mocha */
import {Controller} from 'cerebral'
import {set, state, input} from 'cerebral/operators'
import {form, validateField, validateForm} from '../src'
import {form, validateField, validateForm} from '..'
import assert from 'assert'

describe('validate', () => {
Expand Down
@@ -1,6 +1,6 @@
/* eslint-env mocha */
import {Controller} from 'cerebral'
import {form} from '../src'
import {form} from '.'
import assert from 'assert'

describe('field', () => {
Expand Down
@@ -1,6 +1,6 @@
/* eslint-env mocha */
import {Controller} from 'cerebral'
import {form} from '../src'
import {form} from '.'
import assert from 'assert'

describe('form', () => {
Expand Down
@@ -1,6 +1,6 @@
/* eslint-env mocha */
import {Controller} from 'cerebral'
import {formToJSON, form} from '../src'
import {formToJSON, form} from '..'
import assert from 'assert'

describe('formToJSON', () => {
Expand Down
@@ -1,6 +1,6 @@
/* eslint-env mocha */
import {Controller} from 'cerebral'
import {getFormFields, form} from '../src'
import {getFormFields, form} from '..'
import assert from 'assert'

describe('getFormFields', () => {
Expand Down
@@ -1,6 +1,6 @@
/* eslint-env mocha */
import {Controller} from 'cerebral'
import {getInvalidFormFields, form} from '../src'
import {getInvalidFormFields, form} from '..'
import assert from 'assert'

describe('getFormFields', () => {
Expand Down
@@ -1,6 +1,6 @@
/* eslint-env mocha */
import {Controller} from 'cerebral'
import {isValidForm, form, rules, getInvalidFormFields} from '../src'
import {isValidForm, form, rules, getInvalidFormFields} from '..'
import assert from 'assert'

describe('isValidFrom', () => {
Expand Down
@@ -1,5 +1,5 @@
/* eslint-env mocha */
import {rules} from '../src'
import {rules} from '.'
import assert from 'assert'

describe('rules', () => {
Expand Down

0 comments on commit 4fc2013

Please sign in to comment.