react-native-web-internals
Version:
React Native for Web
23 lines (22 loc) • 1.41 kB
JavaScript
import { createSheet } from "../dom/index.native.js";
describe("createSheet", function () {
test("creates a sheet on the server", function () {
var sheet = createSheet();
expect(typeof sheet.insert).toBe("function"), expect(sheet.id).toMatchInlineSnapshot('"react-native-stylesheet"'), expect(sheet.getTextContent()).toMatchInlineSnapshot(`
"[stylesheet-group=\\"0\\"]{}
body{margin:0;}
button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;}
html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);}
input::-webkit-search-cancel-button,input::-webkit-search-decoration,input::-webkit-search-results-button,input::-webkit-search-results-decoration{display:none;}"
`), sheet.insert(".test { opacity: 0 }", 1), expect(sheet.getTextContent()).toMatchInlineSnapshot(`
"[stylesheet-group=\\"0\\"]{}
body{margin:0;}
button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;}
html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);}
input::-webkit-search-cancel-button,input::-webkit-search-decoration,input::-webkit-search-results-button,input::-webkit-search-results-decoration{display:none;}
[stylesheet-group=\\"1\\"]{}
.test { opacity: 0 }"
`);
});
});
//# sourceMappingURL=dom-test.node.native.js.map