Files
flipper/tsconfig.json
John Knox 781344f7de Fix jest mocking in tests (#592)
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/592

Finally we can join the 21st century and use `jest.mock` in tests!

I'm enabling the ts-jest transform to `*/__tests__/*.tsx` files. This takes care of transforming the typescript, and preserves jest mock capabilities.
I have left the existing custom transform on all other files, so they will continue to work as usual.

Caveats:
* Our existing custom transforms will no longer be applied in tests.
  * With our current suite this makes no difference. But bear in mind things like importing directly from 'flipper' instead of the actual files, won't work. However, I don't see this being a problem, as I think they'll only be needed inside the actual product code.

Reviewed By: passy

Differential Revision: D17978753

fbshipit-source-id: df7b312b5dd5592e4aa4f8df605f5952ea3158e9
2019-10-18 07:17:40 -07:00

24 lines
617 B
JSON

{
"compilerOptions": {
"module": "system",
"lib": ["es7", "dom", "es2017"],
"esModuleInterop": true,
"target": "es6",
"removeComments": true,
"preserveConstEnums": true,
"outFile": "../../built/local/tsc.js",
"sourceMap": true,
"jsx": "react",
"moduleResolution": "node",
"baseUrl": ".",
"downlevelIteration": true,
"paths": {
"flipper": ["./src/index.tsx"],
"live-plugin-manager": ["./types/live-plugin-manager.d.tsx"]
},
"strict": true
},
"include": ["src/**/*", "types/*", "headless/*"],
"exclude": ["node_modules", "**/*.spec.ts"]
}