Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP EXPERIMENT] attempt to use babel preset-typescript instead of ts-jest #492

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions frontend/lib/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,15 @@ function createOnboardingRouteInfo(prefix: string) {
* This namespace parallels our Routes object, providing useful types
* related to specific routes.
*/
/*
export namespace RouteTypes {
export namespace onboarding {
export namespace forIntent {
export type RouteProps = RouteComponentProps<{ intent: string }>;
}
}
}
*/

/**
* This is an ad-hoc structure that defines URL routes for our app.
Expand Down
6 changes: 4 additions & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ const path = require('path');
module.exports = {
"testURL": "http://localhost",
"transform": {
"^.+\\.tsx?$": "ts-jest"
"^.+\\.tsx?$": "./jest.transform.js"
},
"roots": [
"frontend"
],
"collectCoverage": true,
// We need to disable coverage to avoid the following issue:
// https://github.com/istanbuljs/istanbuljs/issues/237
"collectCoverage": false,
"coveragePathIgnorePatterns": [
"/node_modules/",
"safe-mode-globals.d.ts",
Expand Down
17 changes: 17 additions & 0 deletions jest.transform.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module.exports = require('babel-jest').createTransformer({
presets: [
['@babel/preset-env', {
targets: {
"node": "current"
}
}],
'@babel/preset-typescript',
'@babel/preset-react',
],
plugins: [
["@babel/plugin-proposal-decorators", { "legacy": true }],
'@babel/plugin-proposal-class-properties',
"@babel/plugin-syntax-dynamic-import",
"babel-plugin-dynamic-import-node-babel-7",
]
});
184 changes: 124 additions & 60 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.