Skip to content

Commit 352b771

Browse files
committed
Add enough typescript configuration to get mocha failing
We still have some backtraces because we're importing es6 js files into our TS tests, and typescript is understandably failing due to their syntax. Next step is to change those to .ts files, too.
1 parent b875c6a commit 352b771

File tree

8 files changed

+94
-20
lines changed

8 files changed

+94
-20
lines changed

.babelrc

Lines changed: 0 additions & 18 deletions
This file was deleted.

package-lock.json

Lines changed: 71 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,15 @@
2626
"url": "https://github.com/adorableio/adorable-avatars.git"
2727
},
2828
"devDependencies": {
29+
"@types/mocha": "^5.2.6",
30+
"@types/node": "^11.13.4",
2931
"chai": "^4.2.0",
3032
"colors": "^1.3.3",
3133
"concurrently": "^4.1.0",
3234
"find-port": "^2.0.1",
3335
"mocha": "^6.1.3",
34-
"supertest": "^4.0.2"
36+
"supertest": "^4.0.2",
37+
"ts-node": "^8.1.0",
38+
"typescript": "^3.4.3"
3539
}
3640
}

src/index.ts

Whitespace-only changes.
File renamed without changes.
File renamed without changes.

test/mocha.opts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
--require babel-core/register
1+
--require ts-node/register
22
--recursive
33
--reporter spec
4+
test/**/*.test.ts

tsconfig.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"compilerOptions": {
3+
"module": "commonjs",
4+
"esModuleInterop": true,
5+
"target": "es6",
6+
"noImplicitAny": false,
7+
"moduleResolution": "node",
8+
"sourceMap": true,
9+
"outDir": "dist",
10+
"baseUrl": ".",
11+
"paths": {
12+
"*": ["node_modules/*", "src/types/*"]
13+
}
14+
},
15+
"include": ["src/**/*"]
16+
}

0 commit comments

Comments
 (0)