Mastering Development

Cannot read property ‘fromJSON’ of undefined while testing in Jest

while running jest i get the following error.I dont know why am i getting this error. TypeError: Cannot read property ‘fromJSON’ of undefined at Object. (node_modules/@grpc/proto-loader/node_modules/protobufjs/ext/descriptor/index.js:3:66) at Object. (node_modules/@grpc/proto-loader/build/src/index.js:23:20) Below is the tsconfig.json { “compilerOptions”: { “target”: “esnext”, “module”: “commonjs”, “outDir”: “dist”, “sourceMap”: true, “moduleResolution”: “node”, “declaration”: true, “experimentalDecorators”: true, “allowSyntheticDefaultImports”: true, /* Allow default […]

CSS Development

Jest SyntaxError: Unexpected token . with scss

I got this error when trying to setup Jest with React.js and webpack. Somehow Jest doesnt allow me to import files without define. How shoul I do to solve this issue? The Error ({“Object.”:function(module,exports,require,__dirname,__filename,global,jest){.title { SyntaxError: Unexpected token . import { sampleAction } from ‘../../redux/sample/sample.action’; -> import ‘./landing.styles.scss’; Thank you very much for advance jest.config.js […]