Skip to content

Commit 2a87e19

Browse files
CORE-1996: Setup Jest configuration for CSS imports (#113)
Setup Jest configuration for CSS imports - Add identity-obj-proxy as devDependency for mocking CSS imports - Configure Jest moduleNameMapper to handle CSS files - This prepares the test environment for the migration from styled-components to plain CSS Related to CORE-1996 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 829b443 commit 2a87e19

3 files changed

Lines changed: 16 additions & 0 deletions

File tree

jest.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,7 @@ module.exports = {
1313
"json",
1414
"node"
1515
],
16+
"moduleNameMapper": {
17+
"^.+\\.css$": "identity-obj-proxy"
18+
},
1619
};

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
"eslint-plugin-import": "^2.26.0",
5656
"eslint-plugin-react": "^7.30.1",
5757
"eslint-plugin-react-hooks": "^5.0.0",
58+
"identity-obj-proxy": "^3.0.0",
5859
"jest": "^28.1.2",
5960
"jest-environment-jsdom": "^29.3.1",
6061
"jest-environment-node": "^29.6.2",

yarn.lock

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8775,6 +8775,11 @@ gzip-size@^6.0.0:
87758775
dependencies:
87768776
duplexer "^0.1.2"
87778777

8778+
harmony-reflect@^1.4.6:
8779+
version "1.6.2"
8780+
resolved "https://registry.yarnpkg.com/harmony-reflect/-/harmony-reflect-1.6.2.tgz#31ecbd32e648a34d030d86adb67d4d47547fe710"
8781+
integrity sha512-HIp/n38R9kQjDEziXyDTuW3vvoxxyxjxFzXLrBr18uB47GnSt+G9D29fqrpM5ZkspMcPICud3XsBJQ4Y2URg8g==
8782+
87788783
has-ansi@^2.0.0:
87798784
version "2.0.0"
87808785
resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91"
@@ -8954,6 +8959,13 @@ icss-utils@^5.0.0:
89548959
resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-5.1.0.tgz#c6be6858abd013d768e98366ae47e25d5887b1ae"
89558960
integrity sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==
89568961

8962+
identity-obj-proxy@^3.0.0:
8963+
version "3.0.0"
8964+
resolved "https://registry.yarnpkg.com/identity-obj-proxy/-/identity-obj-proxy-3.0.0.tgz#94d2bda96084453ef36fbc5aaec37e0f79f1fc14"
8965+
integrity sha512-00n6YnVHKrinT9t0d9+5yZC6UBNJANpYEQvL2LlX6Ab9lnmxzIRcEmTPuyGScvl1+jKuCICX1Z0Ab1pPKKdikA==
8966+
dependencies:
8967+
harmony-reflect "^1.4.6"
8968+
89578969
ieee754@1.1.13:
89588970
version "1.1.13"
89598971
resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84"

0 commit comments

Comments
 (0)