Skip to content

Commit

Permalink
Fix a test made brittle by the React <span> -> comment change
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan Jacobs committed Jun 28, 2016
1 parent 517ea64 commit 841c56e
Showing 1 changed file with 1 addition and 2 deletions.
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

0 comments on commit 841c56e

Please sign in to comment.