Skip to content

Commit a52f79d

Browse files
committed
Fix IDE errors regarding the rootDir, the rootDir is now in tsconfig.build.json
1 parent 29db203 commit a52f79d

File tree

4 files changed

+14
-5
lines changed

4 files changed

+14
-5
lines changed

tests/lib/Library.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import Library from '@/lib/Library';
2+
import { testUtility } from './utils';
23

34
declare global {
45
namespace NodeJS {
@@ -14,6 +15,9 @@ describe('Library class', () => {
1415

1516
beforeAll(() => {
1617
library = new Library('some param');
18+
// A noop test utility
19+
// demonstrates using utils inside tests
20+
testUtility();
1721
});
1822

1923
afterAll(() => {

tests/lib/utils.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
function testUtility() {
2+
return 1;
3+
}
4+
5+
export { testUtility };

tsconfig.build.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
{
22
"extends": "./tsconfig.json",
3-
"exclude": [
4-
"./tests/**/*"
5-
],
63
"compilerOptions": {
4+
"rootDir": "./src",
75
"noEmit": false
8-
}
6+
},
7+
"exclude": [
8+
"./tests/**/*"
9+
]
910
}

tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"compilerOptions": {
3-
"rootDir": "./src",
43
"outDir": "./dist",
54
"sourceMap": true,
65
"declaration": true,

0 commit comments

Comments
 (0)