Skip to content

Commit

Permalink
Merge pull request #39 from yaycmyk/test-supported-versions
Browse files Browse the repository at this point in the history
Automatically test all supported major React versions
  • Loading branch information
Evan Jacobs authored Jun 28, 2016
2 parents e5eb0be + 841c56e commit 628923c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
8 changes: 8 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,12 @@ node_js:

os: linux

env:
- TARGET_REACT_VERSION=0.14
- TARGET_REACT_VERSION=15

before_install:
- npm install react@$(echo $TARGET_REACT_VERSION)
- npm install react-dom@$(echo $TARGET_REACT_VERSION)

script: npm test
3 changes: 1 addition & 2 deletions __tests__/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -559,14 +559,13 @@ describe('markdown-to-jsx', () => {
const elementNode = ReactDOM.findDOMNode(element);

const text = elementNode.children[0].textContent;
const footnoteLink = elementNode.children[0].children[0];
const footnoteLink = elementNode.querySelector('a');

expect(text).toBe('fooabc bar');

expect(footnoteLink).not.toBe(null);
expect(footnoteLink.textContent).toBe('abc');
expect(footnoteLink.getAttribute('href')).toBe('#abc');
expect(footnoteLink.tagName).toBe('A');
expect(footnoteLink.children[0].tagName).toBe('SUP');
});

Expand Down
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@
"babel-preset-es2015": "^6.9.0",
"babel-preset-react": "^6.11.1",
"babel-preset-stage-2": "^6.11.0",
"jest-cli": "^13.0.0",
"react": "^15.1.0",
"react-dom": "^15.1.0"
"jest-cli": "^13.0.0"
},
"dependencies": {
"remark": "^4.2.2"
Expand Down

0 comments on commit 628923c

Please sign in to comment.