Skip to content

Commit

Permalink
tests: provide regression against #257, inline display CSS rules
Browse files Browse the repository at this point in the history
  • Loading branch information
jsamr committed Jul 17, 2020
1 parent 4997f2f commit 64bc62d
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/__tests__/regression.257.css-display-rule.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import React from "react";
import { StyleSheet } from "react-native";
import HTML from "../index";
import { render } from "react-native-testing-library";

/**
* https://github.com/archriss/react-native-render-html/issues/257
*/
describe("HTML component", () => {
it("should pass regression #257 regarding inline display CSS rules", () => {
const { getByText } = render(
<HTML
html={'<p style="display: inline-block;">hello world</p>'}
/>
);
const text = getByText("hello world");
expect(StyleSheet.flatten(text.props.style)).toMatchObject({ display: 'flex' });
});
});

0 comments on commit 64bc62d

Please sign in to comment.