Skip to content

Commit 8420477

Browse files
committed
fix test cases after adding css and sass loader
1 parent 940e87b commit 8420477

File tree

4 files changed

+21
-4
lines changed

4 files changed

+21
-4
lines changed

jest.config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ module.exports = {
8383
// ],
8484

8585
// A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module
86-
// moduleNameMapper: {},
86+
moduleNameMapper: {
87+
"\\.(css|less|scss)$": "identity-obj-proxy"
88+
},
8789

8890
// An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
8991
// modulePathIgnorePatterns: [],

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "react-simple-boilerplate",
33
"version": "1.0.0",
4-
"description": "",
4+
"description": "Simple react boilerplate with support for travis ci, webpack, sass etc.",
55
"main": "index.js",
66
"scripts": {
77
"build": "webpack ---config ./config/webpack.prod.config.js",
@@ -19,7 +19,7 @@
1919
"react-simple-boilerplate",
2020
"react-boilerplate"
2121
],
22-
"author": "",
22+
"author": "Uday Bhaskhar",
2323
"license": "ISC",
2424
"dependencies": {
2525
"@babel/core": "^7.9.0",
@@ -43,6 +43,7 @@
4343
"eslint-plugin-react": "^7.19.0",
4444
"eslint-plugin-react-hooks": "^2.5.1",
4545
"html-webpack-plugin": "^4.0.4",
46+
"identity-obj-proxy": "^3.0.0",
4647
"jest": "^25.3.0",
4748
"mini-css-extract-plugin": "^0.9.0",
4849
"node-sass": "^4.13.1",

src/__tests__/__snapshots__/app.spec.js.snap

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
exports[`should take a snapshot 1`] = `
44
<DocumentFragment>
5-
<div>
5+
<div
6+
class="App--Container"
7+
>
68
Welcome to React Boilerplate!
79
</div>
810
</DocumentFragment>

yarn.lock

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4120,6 +4120,11 @@ har-validator@~5.1.3:
41204120
ajv "^6.5.5"
41214121
har-schema "^2.0.0"
41224122

4123+
harmony-reflect@^1.4.6:
4124+
version "1.6.1"
4125+
resolved "https://registry.yarnpkg.com/harmony-reflect/-/harmony-reflect-1.6.1.tgz#c108d4f2bb451efef7a37861fdbdae72c9bdefa9"
4126+
integrity sha512-WJTeyp0JzGtHcuMsi7rw2VwtkvLa+JyfEKJCFyfcS0+CDkjQ5lHPu7zEhFZP+PDSRrEgXa5Ah0l1MbgbE41XjA==
4127+
41234128
has-ansi@^2.0.0:
41244129
version "2.0.0"
41254130
resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91"
@@ -4393,6 +4398,13 @@ icss-utils@^4.0.0, icss-utils@^4.1.1:
43934398
dependencies:
43944399
postcss "^7.0.14"
43954400

4401+
identity-obj-proxy@^3.0.0:
4402+
version "3.0.0"
4403+
resolved "https://registry.yarnpkg.com/identity-obj-proxy/-/identity-obj-proxy-3.0.0.tgz#94d2bda96084453ef36fbc5aaec37e0f79f1fc14"
4404+
integrity sha1-lNK9qWCERT7zb7xarsN+D3nx/BQ=
4405+
dependencies:
4406+
harmony-reflect "^1.4.6"
4407+
43964408
ieee754@^1.1.4:
43974409
version "1.1.13"
43984410
resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84"

0 commit comments

Comments
 (0)