-
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.
- Loading branch information
Showing
2 changed files
with
34 additions
and
1 deletion.
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,22 @@ | ||
jest.unmock('../src/components/Title'); | ||
|
||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import TestUtils from 'react-addons-test-utils'; | ||
import Title from '../src/components/Title'; | ||
|
||
describe('Title', () => { | ||
|
||
it('changes the text after click', () => { | ||
// Render a checkbox with label in the document | ||
const title = TestUtils.renderIntoDocument( | ||
<Title>Hello, world! I am a title.</Title> | ||
); | ||
|
||
const titleNode = ReactDOM.findDOMNode(title); | ||
|
||
// Verify that it's Off by default | ||
expect(titleNode.textContent).toEqual('Hello, world! I am a title.'); | ||
}); | ||
|
||
}); |
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 |
---|---|---|
|
@@ -10,19 +10,30 @@ | |
}, | ||
"devDependencies": { | ||
"babel-core": "^6.10.4", | ||
"babel-jest": "^13.0.0", | ||
"babel-loader": "^6.2.4", | ||
"babel-polyfill": "^6.9.1", | ||
"babel-preset-es2015": "^6.9.0", | ||
"babel-preset-react": "^6.11.1", | ||
"css-loader": "^0.23.1", | ||
"extract-text-webpack-plugin": "^1.0.1", | ||
"jest-cli": "^13.0.0", | ||
"react-addons-test-utils": "^15.1.0", | ||
"style-loader": "^0.13.1", | ||
"webpack": "^1.13.1", | ||
"webpack-dev-server": "^1.14.1" | ||
}, | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"test": "jest", | ||
"start": "webpack-dev-server" | ||
}, | ||
"jest": { | ||
"unmockedModulePathPatterns": [ | ||
"../node_modules/react/", | ||
"../node_modules/react-dom/", | ||
"../node_modules/react-addons-test-utils/" | ||
] | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+ssh://[email protected]/grrseguin/jest-N-react-css-modules.git" | ||
|