Skip to content

Commit

Permalink
Upgrade jest (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
richardscarrott committed Mar 24, 2017
1 parent bc5bd10 commit 9b70f57
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 36 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"fs-extra": "^2.1.2",
"identity-obj-proxy": "^3.0.0",
"imports-loader": "^0.7.1",
"jest": "^16.0.2",
"jest": "^19.0.2",
"json-loader": "^0.5.4",
"progress-bar-webpack-plugin": "^1.9.3",
"react": "^15.4.2",
Expand Down
14 changes: 10 additions & 4 deletions src/components/app/__snapshots__/App.test.js.snap
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`components/app/App renders correctly 1`] = `
<div
className="root">
className="root"
>
<Helmet
defaultTitle="60fram.es React Boilerplate"
titleTemplate="%s | 60fram.es React Boilerplate" />
titleTemplate="%s | 60fram.es React Boilerplate"
/>
<div
className="logo">
className="logo"
>
<Link
className="logoContent"
title="Home"
to="/">
to="/"
>
60fram.es
</Link>
</div>
Expand Down
71 changes: 46 additions & 25 deletions src/components/html/__snapshots__/Html.test.js.snap
Original file line number Diff line number Diff line change
@@ -1,84 +1,105 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`components/html/Html renders correctly 1`] = `
<html
lang="en">
lang="en"
>
<head>
<meta
charSet="utf-8" />
charSet="utf-8"
/>
<meta
content="ie=edge,chrome=1"
httpEquiv="x-ua-compatible" />
<title>title</title>
<meta />
httpEquiv="x-ua-compatible"
/>
&lt;title&gt;title&lt;/title&gt;
&lt;meta /&gt;
<meta
content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"
name="viewport" />
name="viewport"
/>
<meta
content="yes"
name="apple-mobile-web-app-capable" />
name="apple-mobile-web-app-capable"
/>
<meta
content="no"
name="msapplication-tap-highlight" />
name="msapplication-tap-highlight"
/>
<link
href="/apple-touch-icon.png"
rel="apple-touch-icon"
sizes="180x180" />
sizes="180x180"
/>
<link
href="/favicon-32x32.png"
rel="icon"
sizes="32x32"
type="image/png" />
type="image/png"
/>
<link
href="/favicon-16x16.png"
rel="icon"
sizes="16x16"
type="image/png" />
type="image/png"
/>
<link
href="/manifest.json"
rel="manifest" />
rel="manifest"
/>
<link
color="#5bbad5"
href="/safari-pinned-tab.svg"
rel="mask-icon" />
rel="mask-icon"
/>
<meta
content="60fram.es"
name="apple-mobile-web-app-title" />
name="apple-mobile-web-app-title"
/>
<meta
content="60fram.es"
name="application-name" />
name="application-name"
/>
<meta
content="#ffffff"
name="theme-color" />
<link />
name="theme-color"
/>
&lt;link /&gt;
<link
href="https://60fram.es/bundle.css"
rel="stylesheet" />
rel="stylesheet"
/>
</head>
<body>
<div
dangerouslySetInnerHTML={
Object {
"__html": "
<div id=\"root\">
<div id=\\"root\\">
Hello World.
</div>
",
}
}
id="root" />
id="root"
/>
<script
dangerouslySetInnerHTML={
Object {
"__html": "window.process = {\"env\":{\"BROWSER\":\"true\",\"REDUX_LOGGER\":\"true\",\"API_ENDPOINT\":\"http:\\u002F\\u002Flocalhost:6060\\u002Fapi\"}}",
"__html": "window.process = {\\"env\\":{\\"BROWSER\\":\\"true\\",\\"REDUX_LOGGER\\":\\"true\\",\\"API_ENDPOINT\\":\\"http:\\\\u002F\\\\u002Flocalhost:6060\\\\u002Fapi\\"}}",
}
} />
}
/>
<script
dangerouslySetInnerHTML={
Object {
"__html": "window.__INITIAL_STATE__ = {\"initial\":\"state\"}",
"__html": "window.__INITIAL_STATE__ = {\\"initial\\":\\"state\\"}",
}
} />
}
/>
<script
src="https://60fram.es/bundle.js" />
src="https://60fram.es/bundle.js"
/>
</body>
</html>
`;
11 changes: 8 additions & 3 deletions src/components/index/__snapshots__/Index.test.js.snap
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`components/index/Index renders a loading indicator 1`] = `
<div
className="root">
className="root"
>
<p>
Loading...
</p>
Expand All @@ -9,7 +12,8 @@ exports[`components/index/Index renders a loading indicator 1`] = `

exports[`components/index/Index renders a quote 1`] = `
<div
className="root">
className="root"
>
<p>
A quote
</p>
Expand All @@ -18,7 +22,8 @@ exports[`components/index/Index renders a quote 1`] = `

exports[`components/index/Index renders an error 1`] = `
<div
className="root">
className="root"
>
<p>
Error...
An error
Expand Down
5 changes: 4 additions & 1 deletion src/components/notfound/__snapshots__/NotFound.test.js.snap
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`components/notfound/NotFound renders correctly 1`] = `
<div
className="root">
className="root"
>
404 Not Found
</div>
`;
8 changes: 6 additions & 2 deletions src/components/root/__snapshots__/Root.test.js.snap
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`components/root/Root renders correctly 1`] = `
<Provider
store={
Object {
"store": "store",
}
}>
}
>
<Router
history={
Object {
"history": "history",
}
}
routes="routes" />
routes="routes"
/>
</Provider>
`;

0 comments on commit 9b70f57

Please sign in to comment.