react-native-web-internals
Version:
React Native for Web
24 lines (23 loc) • 1.42 kB
JavaScript
;
var import_dom = require("../dom");
describe("createSheet", function() {
test("creates a sheet on the server", function() {
var sheet = (0, import_dom.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.js.map