Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Semigradsky committed Jun 23, 2015
1 parent c37c053 commit 9db2b9f
Show file tree
Hide file tree
Showing 14 changed files with 19 additions and 21 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
"react-component"
],
"devDependencies": {
"babel": "^5.6.4",
"babel-core": "^5.1.11",
"babel-loader": "^5.0.0",
"jasmine-node": "^1.14.5",
"react": "^0.13.1",
"jsdom": "^3.1.2",
"node-jsx": "^0.13.2",
"react": "^0.13.1",
"webpack": "^1.7.3",
"webpack-dev-server": "^1.7.0"
},
Expand Down
8 changes: 4 additions & 4 deletions specs/Element-spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ it('should allow an undefined value to be updated to a value', function (done) {
<Formsy.Form disabled={this.state.bool}>
{this.state.bool ?
<TestInput name="foo" /> :
<TestInput name="bar" />
<TestInput name="bar" />
}
</Formsy.Form>
);
Expand All @@ -555,7 +555,7 @@ it('should allow an undefined value to be updated to a value', function (done) {
expect(input.isFormDisabled()).toBe(true);
form.flip();
expect(input.isFormDisabled()).toBe(false);

});

it('should allow for dot notation in name which maps to a deep object', function () {
Expand All @@ -569,7 +569,7 @@ it('should allow an undefined value to be updated to a value', function (done) {

var TestForm = React.createClass({
onSubmit: function (model) {
expect(model).toEqual({foo: {bar: 'foo', test: 'test'}});
expect(model).toEqual({foo: {bar: 'foo', test: 'test'}});
},
render: function () {
return (
Expand All @@ -584,7 +584,7 @@ it('should allow an undefined value to be updated to a value', function (done) {
var form = TestUtils.renderIntoDocument(<TestForm/>);
var formEl = TestUtils.findRenderedDOMComponentWithTag(form, 'form');
TestUtils.Simulate.submit(formEl);

});

});
2 changes: 1 addition & 1 deletion specs/Rules-equals-spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe('Rules: equals', function() {
});

afterEach(function() {
TestInput = isValid = isInvalid = form = null;
TestInput = isValid = form = null;
});

it('should pass with a default value', pass());
Expand Down
2 changes: 1 addition & 1 deletion specs/Rules-isAlpha-spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe('Rules: isAlpha', function() {
});

afterEach(function() {
TestInput = isValid = isInvalid = form = null;
TestInput = isValid = form = null;
});

it('should pass with a default value', pass());
Expand Down
2 changes: 1 addition & 1 deletion specs/Rules-isEmail-spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe('Rules: isEmail', function() {
});

afterEach(function() {
TestInput = isValid = isInvalid = form = null;
TestInput = isValid = form = null;
});

it('should pass with a default value', pass());
Expand Down
2 changes: 1 addition & 1 deletion specs/Rules-isEmptyString-spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe('Rules: isEmptyString', function() {
});

afterEach(function() {
TestInput = isValid = isInvalid = form = null;
TestInput = isValid = form = null;
});

it('should fail with a default value', fail());
Expand Down
2 changes: 1 addition & 1 deletion specs/Rules-isExisty-spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe('Rules: isExisty', function() {
});

afterEach(function() {
TestInput = isValid = isInvalid = form = null;
TestInput = isValid = form = null;
});

it('should fail with a default value', fail());
Expand Down
2 changes: 1 addition & 1 deletion specs/Rules-isLength-spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe('Rules: isLength', function() {
});

afterEach(function() {
TestInput = isValid = isInvalid = form = null;
TestInput = isValid = form = null;
});

describe('isLength:3', function() {
Expand Down
2 changes: 1 addition & 1 deletion specs/Rules-isNumeric-spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe('Rules: isNumeric', function() {
});

afterEach(function() {
TestInput = isValid = isInvalid = form = null;
TestInput = isValid = form = null;
});

it('should pass with a default value', pass());
Expand Down
2 changes: 1 addition & 1 deletion specs/Rules-isUrl-spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe('Rules: isUrl', function() {
});

afterEach(function() {
TestInput = isValid = isInvalid = form = null;
TestInput = isValid = form = null;
});

it('should pass with a default value', pass());
Expand Down
2 changes: 1 addition & 1 deletion specs/Rules-isWords-spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe('Rules: isWords', function() {
});

afterEach(function() {
TestInput = isValid = isInvalid = form = null;
TestInput = isValid = form = null;
});

it('should pass with a default value', pass());
Expand Down
2 changes: 1 addition & 1 deletion specs/Rules-maxLength-spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe('Rules: maxLength', function() {
});

afterEach(function() {
TestInput = isValid = isInvalid = form = null;
TestInput = isValid = form = null;
});

it('should pass with a default value', pass());
Expand Down
2 changes: 1 addition & 1 deletion specs/Rules-minLength-spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe('Rules: minLength', function() {
});

afterEach(function() {
TestInput = isValid = isInvalid = form = null;
TestInput = isValid = form = null;
});

describe('minLength:3', function() {
Expand Down
6 changes: 2 additions & 4 deletions testrunner.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
require('node-jsx').install({
extension: '.jsx'
});
require('babel/register');

var path = require('path');
var jsdom = require("jsdom").jsdom;
var jsdom = require('jsdom').jsdom;
var jasmine = require('jasmine-node');

global.document = jsdom();
Expand Down

0 comments on commit 9db2b9f

Please sign in to comment.