Closed ThomasBrekelmans closed 7 years ago
EDIT: After creating a new example project from scratch, this library works as expected. Sorry for the confusion, please delete/close this issue.
I've used the following package.json to get everything up and running:
package.json
{ "name": "jest-glamor-react-example", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "jest" }, "author": "", "license": "UNLICENSED", "devDependencies": { "babel-jest": "^20.0.0", "babel-preset-env": "^1.4.0", "babel-preset-react": "^6.24.1", "glamor": "^2.20.25", "jest": "^20.0.0", "jest-glamor-react": "^1.3.0", "react": "^15.5.4", "react-dom": "^15.5.4", "react-test-renderer": "^15.5.4" } }
With the following .babelrc file:
.babelrc
{ "presets": [ ["env", { "targets": { "node": 7 } }], "react" ] }
I then added a file in test/Example.test.js with the contents of the example in the README.md.
test/Example.test.js
Then running npm t creates the snapshot with the style rules in them as expected.
npm t
Again, thanks for this!
Glad you got it working!
EDIT: After creating a new example project from scratch, this library works as expected. Sorry for the confusion, please delete/close this issue.
I've used the following
package.json
to get everything up and running:With the following
.babelrc
file:I then added a file in
test/Example.test.js
with the contents of the example in the README.md.Then running
npm t
creates the snapshot with the style rules in them as expected.Again, thanks for this!