Skip to content

Commit

Permalink
Update dev deps & fix test for React v15
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan Jacobs committed Apr 29, 2016
1 parent db0fc3d commit b9c56ca
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 33 deletions.
11 changes: 3 additions & 8 deletions __tests__/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -558,21 +558,16 @@ describe('markdown-to-jsx', () => {

const elementNode = ReactDOM.findDOMNode(element);

const text = elementNode.children[0].children[0];
const footnoteLink = elementNode.children[0].children[1];
const restOfText = elementNode.children[0].children[2];
const text = elementNode.children[0].textContent;
const footnoteLink = elementNode.children[0].children[0];

expect(text).not.toBe(null);
expect(text.textContent).toBe('foo');
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');

expect(restOfText).not.toBe(null);
expect(restOfText.textContent).toBe(' bar');
});

it('should inject the definitions in a footer at the end of the root', () => {
Expand Down
9 changes: 0 additions & 9 deletions jest.preprocessor.js

This file was deleted.

22 changes: 6 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@
"jsnext:main": "index.js",
"devDependencies": {
"babel-cli": "^6.3.13",
"babel-jest": "^6.0.1",
"babel-jest": "^12.0.2",
"babel-preset-es2015": "^6.3.13",
"babel-preset-react": "^6.3.13",
"babel-preset-stage-2": "^6.3.13",
"jest-cli": "^0.9.0",
"react": "^0.14.0",
"react-dom": "^0.14.0"
"jest-cli": "^12.0.2",
"react": "^15.0.0",
"react-dom": "^15.0.0"
},
"dependencies": {
"remark": "^4.0.0"
},
"peerDependencies": {
"react": "^0.14.0"
"react": ">= 0.14.0"
},
"babel": {
"presets": [
Expand All @@ -38,17 +38,7 @@
]
},
"jest": {
"scriptPreprocessor": "./jest.preprocessor.js",
"testRunner": "./node_modules/jest-cli/src/testRunners/jasmine/jasmine2.js",
"unmockedModulePathPatterns": [
"."
],
"modulePathIgnorePatterns": [
"./node_modules/"
],
"preprocessorIgnorePatterns": [
"./node_modules/"
]
"automock": false
},
"scripts": {
"prepublish": "npm run es5",
Expand Down

0 comments on commit b9c56ca

Please sign in to comment.