npm i react babel mocha expect
NODE_ENV=test ./node_modules/.bin/mocha --compilers js:babel/register shallow-rendering.spec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { renderToString } from 'react-dom/server'; | |
import createEmotionServer from '@emotion/server/create-instance'; | |
import { CacheProvider } from '@emotion/react'; | |
import { createDocsCache, docsCacheKey } from './utils/create-emotion-cache'; | |
const patchedLobotomizedOwlSelector = '> *:not(style) ~ *:not(style)'; | |
const lobotomizedOwlSelectorRegex = />\s*\*\s*\+\s*\*/g; | |
export const replaceRenderer = ({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> | |
<title>Animated typing terminal prompt</title> | |
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.1.1/css/bootstrap.min.css"> | |
<link rel="stylesheet" href="/static/stylesheets/main.css" media="screen"> | |
</head> |