Repository URL to install this package:
Version:
1.2.13 ▾
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`ssr should add a nonce to the stylesheet if webpack nonce is detected in the global scope 1`] = `"<h1 class=\\"sc-a b\\" data-reactroot=\\"\\">Hello SSR!</h1>"`;
exports[`ssr should add a nonce to the stylesheet if webpack nonce is detected in the global scope 2`] = `
"<style nonce=\\"foo\\" data-styled-components=\\"b\\">
/* sc-component-id: sc-global-2303210225 */
body{background:papayawhip;}
/* sc-component-id: sc-a */
.sc-a {} .b{color:red;}</style>"
`;
exports[`ssr should allow global styles to be injected during rendering 1`] = `"<h1 class=\\"PageOne a\\" data-reactroot=\\"\\">Camera One!</h1>"`;
exports[`ssr should allow global styles to be injected during rendering 2`] = `
"<style data-styled-components=\\"a\\">
/* sc-component-id: sc-global-737874422 */
html::before{content:'Before both renders';}
/* sc-component-id: PageOne */
.PageOne {} .a{color:red;}</style><style data-styled-components=\\"\\">
/* sc-component-id: sc-global-2914197427 */
html::before{content:'During first render';}</style>"
`;
exports[`ssr should allow global styles to be injected during rendering 3`] = `"<h2 class=\\"PageTwo b\\" data-reactroot=\\"\\">Camera Two!</h2>"`;
exports[`ssr should allow global styles to be injected during rendering 4`] = `
"<style data-styled-components=\\"b\\">
/* sc-component-id: sc-global-737874422 */
html::before{content:'Before both renders';}
/* sc-component-id: PageTwo */
.PageTwo {} .b{color:blue;}
/* sc-component-id: sc-global-2914197427 */
html::before{content:'During first render';}
/* sc-component-id: sc-global-1207956261 */
html::before{content:'Between renders';}</style><style data-styled-components=\\"\\">
/* sc-component-id: sc-global-3990873394 */
html::before{content:'During second render';}</style>"
`;
exports[`ssr should dispatch global styles to each ServerStyleSheet 1`] = `"<h1 class=\\"Header a\\" data-reactroot=\\"\\"></h1>"`;
exports[`ssr should dispatch global styles to each ServerStyleSheet 2`] = `
"<style data-styled-components=\\"a\\">
/* sc-component-id: sc-global-2303210225 */
body{background:papayawhip;}
/* sc-component-id: Header */
.Header {} .a{-webkit-animation:keyframe_0 1s both;animation:keyframe_0 1s both;}</style><style data-styled-components=\\"keyframe_0\\">
/* sc-component-id: sc-keyframes-keyframe_0 */
@-webkit-keyframes keyframe_0{0%{opacity:0;}} @keyframes keyframe_0{0%{opacity:0;}}</style>"
`;
exports[`ssr should extract both global and local CSS 1`] = `"<h1 class=\\"sc-a b\\" data-reactroot=\\"\\">Hello SSR!</h1>"`;
exports[`ssr should extract both global and local CSS 2`] = `
"<style data-styled-components=\\"b\\">
/* sc-component-id: sc-global-2303210225 */
body{background:papayawhip;}
/* sc-component-id: sc-a */
.sc-a {} .b{color:red;}</style>"
`;
exports[`ssr should extract the CSS in a simple case 1`] = `"<h1 class=\\"sc-a b\\" data-reactroot=\\"\\">Hello SSR!</h1>"`;
exports[`ssr should extract the CSS in a simple case 2`] = `
"<style data-styled-components=\\"b\\">
/* sc-component-id: sc-a */
.sc-a {} .b{color:red;}</style>"
`;
exports[`ssr should handle errors while streaming 1`] = `[Invariant Violation: React.Children.only expected to receive a single React element child.]`;
exports[`ssr should interleave styles with rendered HTML when utilitizing streaming 1`] = `
"<style data-styled-components=\\"b\\" data-styled-streamed=\\"true\\">
/* sc-component-id: sc-global-2303210225 */
body{background:papayawhip;}
/* sc-component-id: sc-a */
.sc-a {} .b{color:red;}</style><h1 class=\\"sc-a b\\" data-reactroot=\\"\\">Hello SSR!</h1>"
`;
exports[`ssr should render CSS in the order the components were defined, not rendered 1`] = `"<div data-reactroot=\\"\\"><h2 class=\\"TWO a\\"></h2><h1 class=\\"ONE b\\"></h1></div>"`;
exports[`ssr should render CSS in the order the components were defined, not rendered 2`] = `
"<style data-styled-components=\\"a b\\">
/* sc-component-id: ONE */
.ONE {} .b{color:red;}
/* sc-component-id: TWO */
.TWO {} .a{color:blue;}</style>"
`;
exports[`ssr should return a generated React style element 1`] = `
Object {
"dangerouslySetInnerHTML": Object {
"__html": "
/* sc-component-id: sc-global-2303210225 */
body{background:papayawhip;}
/* sc-component-id: sc-a */
.sc-a {} .b{color:red;}",
},
"data-styled-components": "b",
}
`;
exports[`ssr should share global styles but keep renders separate 1`] = `"<h1 class=\\"PageOne a\\" data-reactroot=\\"\\">Camera One!</h1>"`;
exports[`ssr should share global styles but keep renders separate 2`] = `
"<style data-styled-components=\\"a\\">
/* sc-component-id: sc-global-2303210225 */
body{background:papayawhip;}
/* sc-component-id: PageOne */
.PageOne {} .a{color:red;}</style>"
`;
exports[`ssr should share global styles but keep renders separate 3`] = `"<h2 class=\\"PageTwo b\\" data-reactroot=\\"\\">Camera Two!</h2>"`;
exports[`ssr should share global styles but keep renders separate 4`] = `
"<style data-styled-components=\\"b\\">
/* sc-component-id: sc-global-2303210225 */
body{background:papayawhip;}
/* sc-component-id: PageTwo */
.PageTwo {} .b{color:blue;}</style>"
`;