Skip to content

Commit

Permalink
Add failing test for compiling HTML
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathaningram committed Jan 9, 2018
1 parent 27e7647 commit 94415ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,15 +142,15 @@ it('should be able to compile image', () => {

it('should be able to compile html', () => {
const compile = marksy({ createElement });
const compiled = compile('<div>hello</div>');
const compiled = compile('<div>hello</div>\n<strong>there</strong>\n<em>world</em>');
const tree = renderer.create(<TestComponent>{compiled.tree}</TestComponent>).toJSON();

expect(tree).toMatchSnapshot();
});

it('should be able to compile html as components', () => {
const compile = marksyComponents({ createElement });
const compiled = compile('<div>hello</div>');
const compiled = compile('<div>hello</div>\n<strong>there</strong>\n<em>world</em>');
const tree = renderer.create(<TestComponent>{compiled.tree}</TestComponent>).toJSON();

expect(tree).toMatchSnapshot();
Expand Down

0 comments on commit 94415ca

Please sign in to comment.