Skip to content

Commit

Permalink
Switch from Babel to Typescript. Fixes #801 (#831)
Browse files Browse the repository at this point in the history
* #801 changed from Babel to Typescript.

* Fix merge conflicts

* babel-jest replaced by ts-jest

* Fix some config and upgrade Jest because ts-jest not happy with old version

* Minor config changes

* WIP on fixing tests with localStorage

* Fix lint

* Fix tests

* updated branch and lint fixes

* Lock down dependency versions to exact versions

* test fixes build ci

* test fixes build ci

* Ignore test path /dist/
  • Loading branch information
guyellis committed Aug 11, 2019
1 parent a2a6eca commit 562bb56
Show file tree
Hide file tree
Showing 15 changed files with 13,064 additions and 14,138 deletions.
3 changes: 0 additions & 3 deletions .babelrc

This file was deleted.

1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
public/
coverage/
node_modules/
dist/
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@
"no-restricted-globals": [0],
"react/no-unused-state": [0]
}
}
}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,6 @@ public

# webstorm
.idea

# tsc output
dist/
13 changes: 13 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Jest (this file)",
"type": "node",
"request": "launch",
"runtimeArgs": [
"--inspect-brk",
"${workspaceFolder}/node_modules/.bin/jest",
"${relativeFile}"
],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"port": 9229
},
{
"name": "Chrome",
"type": "chrome",
Expand Down
7 changes: 6 additions & 1 deletion jest.config.js
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
module.exports = {
verbose: true,
testPathIgnorePatterns: ['/dist/'],
collectCoverageFrom: [
'!**/.vscode/**',
'!**/coverage/**',
'!**/dist/**',
'!**/jest.config.js',
'!**/node_modules/**',
'!**/postcss.config.js',
Expand All @@ -22,5 +24,8 @@ module.exports = {
statements: 70,
},
},
setupTestFrameworkScriptFile: './test/_setup.js',
setupFilesAfterEnv: ['<rootDir>/test/_setup.js'],
transform: {
'.+\\.(j|t)sx?$': 'ts-jest',
},
};
Loading

0 comments on commit 562bb56

Please sign in to comment.