Adding identity-obj-proxy for CSS module mocks

This commit is contained in:
Jeff Avallone 2018-02-13 17:15:33 -05:00
parent 20adf55c11
commit 1fd797f52a
5 changed files with 24 additions and 9 deletions

View File

@ -34,7 +34,7 @@
], ],
"moduleNameMapper": { "moduleNameMapper": {
"\\.svg$": "<rootDir>/src/__mocks__/svgMock.js", "\\.svg$": "<rootDir>/src/__mocks__/svgMock.js",
"\\.css$": "<rootDir>/src/__mocks__/styleMock.js" "\\.css$": "identity-obj-proxy"
}, },
"collectCoverageFrom": [ "collectCoverageFrom": [
"src/**/*.js", "src/**/*.js",
@ -71,6 +71,7 @@
"html-webpack-plugin": "^2.30.1", "html-webpack-plugin": "^2.30.1",
"i18next": "^10.3.0", "i18next": "^10.3.0",
"i18next-browser-languagedetector": "^2.1.0", "i18next-browser-languagedetector": "^2.1.0",
"identity-obj-proxy": "^3.0.0",
"jest": "^22.2.2", "jest": "^22.2.2",
"json-loader": "^0.5.7", "json-loader": "^0.5.7",
"npm-run-all": "^4.1.2", "npm-run-all": "^4.1.2",

View File

@ -1 +0,0 @@
module.exports = {};

View File

@ -2,6 +2,7 @@
exports[`Header rendering 1`] = ` exports[`Header rendering 1`] = `
<header <header
className="header"
data-banner="testing" data-banner="testing"
> >
<h1> <h1>

View File

@ -2,14 +2,18 @@
exports[`Message rendering 1`] = ` exports[`Message rendering 1`] = `
<div <div
className="" className="message"
> >
<div> <div
className="header"
>
<h2> <h2>
Testing Testing
</h2> </h2>
</div> </div>
<div> <div
className="content"
>
<p> <p>
Message content Message content
</p> </p>
@ -19,14 +23,18 @@ exports[`Message rendering 1`] = `
exports[`Message rendering with icon 1`] = ` exports[`Message rendering with icon 1`] = `
<div <div
class="" class="message"
> >
<div> <div
class="header"
>
<h2> <h2>
Sample icon SVGTesting Sample icon SVGTesting
</h2> </h2>
</div> </div>
<div> <div
class="content"
>
<p> <p>
Message content Message content
</p> </p>

View File

@ -3366,7 +3366,7 @@ har-validator@~5.0.3:
ajv "^5.1.0" ajv "^5.1.0"
har-schema "^2.0.0" har-schema "^2.0.0"
harmony-reflect@^1.4.2: harmony-reflect@^1.4.2, harmony-reflect@^1.4.6:
version "1.5.1" version "1.5.1"
resolved "https://registry.yarnpkg.com/harmony-reflect/-/harmony-reflect-1.5.1.tgz#b54ca617b00cc8aef559bbb17b3d85431dc7e329" resolved "https://registry.yarnpkg.com/harmony-reflect/-/harmony-reflect-1.5.1.tgz#b54ca617b00cc8aef559bbb17b3d85431dc7e329"
@ -3688,6 +3688,12 @@ icss-utils@^2.1.0:
dependencies: dependencies:
postcss "^6.0.1" postcss "^6.0.1"
identity-obj-proxy@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/identity-obj-proxy/-/identity-obj-proxy-3.0.0.tgz#94d2bda96084453ef36fbc5aaec37e0f79f1fc14"
dependencies:
harmony-reflect "^1.4.6"
ieee754@^1.1.4: ieee754@^1.1.4:
version "1.1.8" version "1.1.8"
resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4"