forked from heilhead/react-bootstrap-validation
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request heilhead#45 from brewsoftware/feature/Jest-UnitTes…
…tingFramework Feature/jest unit testing framework
- Loading branch information
Showing
4 changed files
with
47 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{ "presets": ["es2015","react"] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
'use strict'; | ||
import Form from '../src/Form'; | ||
|
||
// Note: THere is an issue with react-bootstrap and mocking. For now the whole node_modules directory has been unmocked. | ||
describe('React bootstrap validation compilation test', () => { | ||
var React = require('react'); | ||
var TestUtils = require('react-addons-test-utils'); | ||
|
||
beforeEach(function() { | ||
|
||
}); | ||
|
||
it('Renders Form component correctly.', () => { | ||
// Render into document | ||
TestUtils.renderIntoDocument(<div></div>); | ||
TestUtils.renderIntoDocument( | ||
<Form onValidSubmit={ function(event) | ||
{ | ||
// Do some work with the validation outcomes | ||
} | ||
} />); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters