Skip to content

Commit 9f78c9d

Browse files
authored
chore: fix broken type check for test files (#7567)
**Motivation** Check the types for test files **Description** - Add `test` folder for the `tsconfig.json` files **Steps to test or reproduce** - Run all tests
1 parent 7ce4939 commit 9f78c9d

File tree

22 files changed

+24
-44
lines changed

22 files changed

+24
-44
lines changed

packages/api/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"extends": "../../tsconfig.json",
3-
"include": ["src"],
3+
"include": ["src", "test"],
44
"compilerOptions": {
55
"outDir": "lib"
66
}

packages/beacon-node/test/e2e/eth1/eth1ForBlockProduction.test.ts

-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ describe.skip("eth1 / Eth1Provider", () => {
3232
const logger = testLogger();
3333

3434
let db: BeaconDb;
35-
let interval: NodeJS.Timeout;
3635

3736
beforeAll(async () => {
3837
// Nuke DB to make sure it's empty
@@ -42,7 +41,6 @@ describe.skip("eth1 / Eth1Provider", () => {
4241
});
4342

4443
afterAll(async () => {
45-
clearInterval(interval);
4644
controller.abort();
4745
await db.close();
4846
await LevelDbController.destroy(dbLocation);

packages/beacon-node/test/tsconfig.json

-6
This file was deleted.

packages/beacon-node/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"extends": "../../tsconfig.json",
33
"exclude": ["../../node_modules/it-pipe"],
4-
"include": ["src"],
4+
"include": ["src", "test"],
55
"compilerOptions": {
66
"outDir": "lib"
77
}

packages/cli/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"extends": "../../tsconfig.json",
3-
"include": ["src"],
3+
"include": ["src", "test"],
44
"compilerOptions": {
55
"outDir": "lib"
66
}

packages/config/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"extends": "../../tsconfig.json",
3-
"include": ["src"],
3+
"include": ["src", "test"],
44
"compilerOptions": {
55
"outDir": "lib"
66
}

packages/db/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"extends": "../../tsconfig.json",
3-
"include": ["src"],
3+
"include": ["src", "test"],
44
"compilerOptions": {
55
"outDir": "lib"
66
}

packages/flare/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"extends": "../../tsconfig.json",
3-
"include": ["src"],
3+
"include": ["src", "test"],
44
"compilerOptions": {
55
"outDir": "lib"
66
}

packages/fork-choice/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"extends": "../../tsconfig.json",
3-
"include": ["src"],
3+
"include": ["src", "test"],
44
"compilerOptions": {
55
"outDir": "lib"
66
}

packages/light-client/tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"extends": "../../tsconfig.json",
3+
"include": ["src", "test"],
34
"exclude": ["src/index.browser.ts", "test/unit/webEsmBundle.browser.test.ts"]
45
}

packages/logger/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"extends": "../../tsconfig.json",
3-
"include": ["src"],
3+
"include": ["src", "test"],
44
"compilerOptions": {
55
"outDir": "lib"
66
}

packages/params/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"extends": "../../tsconfig.json",
3-
"include": ["src"],
3+
"include": ["src", "test"],
44
"compilerOptions": {
55
"outDir": "lib"
66
}

packages/prover/test/tsconfig.json

-6
This file was deleted.

packages/prover/tsconfig.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"extends": "../../tsconfig.json",
3-
"include": ["src"],
3+
"include": ["src", "test"],
44
"compilerOptions": {
55
// To fix error "Duplicate identifier 'Buffer'"
6-
// This can save time during compilation at the expense of type-system accuracy.
7-
// For example, two libraries could define two copies of the same type in an inconsistent way.
6+
// This can save time during compilation at the expense of type-system accuracy.
7+
// For example, two libraries could define two copies of the same type in an inconsistent way.
88
// Rather than doing a full check of all d.ts files, TypeScript will type check
99
// the code you specifically refer to in your app’s source code.
1010
// https://www.typescriptlang.org/tsconfig#skipLibCheck

packages/reqresp/tsconfig.json

+4-9
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
{
22
"extends": "../../tsconfig.json",
3-
"include": ["src"],
4-
"exclude": [
5-
"../../node_modules/it-pipe"
6-
],
3+
"include": ["src", "test"],
4+
"exclude": ["../../node_modules/it-pipe"],
75
"compilerOptions": {
86
"outDir": "lib",
9-
"typeRoots": [
10-
"../../node_modules/@types",
11-
"../../types"
12-
]
7+
"typeRoots": ["../../node_modules/@types", "../../types"]
138
}
14-
}
9+
}

packages/spec-test-util/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"extends": "../../tsconfig.json",
3-
"include": ["src"],
3+
"include": ["src", "test"],
44
"compilerOptions": {
55
"outDir": "lib"
66
}

packages/state-transition/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"extends": "../../tsconfig.json",
3-
"include": ["src"],
3+
"include": ["src", "test"],
44
"compilerOptions": {
55
"outDir": "lib"
66
}

packages/test-utils/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"extends": "../../tsconfig.json",
3-
"include": ["src"],
3+
"include": ["src", "test"],
44
"compilerOptions": {
55
"outDir": "lib"
66
}

packages/types/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"extends": "../../tsconfig.json",
3-
"include": ["src"],
3+
"include": ["src", "test"],
44
"compilerOptions": {
55
"outDir": "lib"
66
}

packages/utils/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"extends": "../../tsconfig.json",
3-
"include": ["src"],
3+
"include": ["src", "test"],
44
"compilerOptions": {
55
"outDir": "lib"
66
}

packages/validator/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"extends": "../../tsconfig.json",
3-
"include": ["src"],
3+
"include": ["src", "test"],
44
"compilerOptions": {
55
"outDir": "lib"
66
}

tsconfig.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
"compilerOptions": {
44
"emitDeclarationOnly": false,
55
"incremental": false,
6-
// Enable it when upgrade `vite-plugin-dts`
7-
// "noCheck": false,
86
"noEmit": true,
97
// To be used in the test fixtures
108
"resolveJsonModule": true,
@@ -16,4 +14,4 @@
1614
"ts-node": {
1715
"transpileOnly": true
1816
}
19-
}
17+
}

0 commit comments

Comments
 (0)