Skip to content

Commit ec6f559

Browse files
authored
Merge pull request #317 from proto-kit/feature/lint-integration-tests
Lint integration tests
2 parents 939db5c + 2cbed43 commit ec6f559

File tree

11 files changed

+24
-9
lines changed

11 files changed

+24
-9
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"build:clean": "npx nx reset && npm run build",
1010
"build-docker": "docker build -t protokit-base -f ./packages/deployment/docker/base/Dockerfile .",
1111
"lint": "npx lerna run lint",
12+
"lint:fix": "npx lerna run lint -- --fix",
1213
"lint:staged": "eslint",
1314
"test": "npx lerna run test -- --passWithNoTests",
1415
"test:ci": "npx lerna run test --concurrency=1 -- --passWithNoTests --forceExit",

packages/persistance/.eslintrc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
{
22
"extends": "../../.eslintrc",
3+
"parserOptions": {
4+
"project": ["./tsconfig.json", "./test/tsconfig.json", "./test-integration/tsconfig.json"]
5+
},
36
"rules": {
47
"no-underscore-dangle": "off",
58
"@typescript-eslint/consistent-type-assertions": "off"
69
}
7-
}
10+
}

packages/sequencer/.eslintrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": ["../../.eslintrc"],
3+
"parserOptions": {
4+
"project": ["./tsconfig.json", "./test/tsconfig.json", "./test-integration/tsconfig.json"]
5+
},
6+
}

packages/sequencer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"scripts": {
88
"build": "tsc -p tsconfig.json",
99
"dev": "tsc -p tsconfig.json --watch",
10-
"lint": "eslint ./src ./test",
10+
"lint": "eslint ./src ./test ./test-integration",
1111
"test:file": "node --experimental-vm-modules --experimental-wasm-modules ../../node_modules/jest/bin/jest.js",
1212
"test": "npm run test:file -- ./test/**",
1313
"test:watch": "npm run test:file -- ./test/** --watch",

packages/sequencer/test-integration/ArchiveNode.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { describe } from "@jest/globals";
22

33
import { ArchiveNode } from "../src/settlement/utils/ArchiveNode";
4-
import { TokenId } from "o1js";
54

65
describe("ArchiveNode", () => {
76
it("should resolve", async () => {

packages/sequencer/test-integration/Settlement-lightnet.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { PrivateKey } from "o1js";
22
import { log } from "@proto-kit/common";
3+
import { FungibleToken } from "mina-fungible-token";
34

45
import { settlementTestFn } from "../test/settlement/Settlement";
5-
import { FungibleToken } from "mina-fungible-token";
66

77
console.log(PrivateKey.random().toPublicKey().toBase58());
88

packages/sequencer/test-integration/benchmarks/tps.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import {
2727
DatabasePruneModule,
2828
ManualBlockTrigger,
2929
Sequencer,
30-
AppChain,
3130
} from "../../src";
3231
// we import PrivateMempool from dist to satisfy constraints of InMemoryTransactionSender
3332
import { PrivateMempool } from "../../dist";

packages/sequencer/test-integration/workers/ChildProcessWorker.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,17 @@ export class ChildProcessWorker {
2121
}
2222
);
2323
s.on("error", (err) => {
24+
// eslint-disable-next-line no-console
2425
console.error(err);
2526
});
2627
if (forwardLogs) {
2728
s.stdout.on("data", (data) => {
29+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
2830
process.stdout.write(data);
2931
});
3032
}
3133
s.stderr.on("data", (data) => {
34+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
3235
process.stderr.write(data);
3336
});
3437

@@ -37,6 +40,7 @@ export class ChildProcessWorker {
3740

3841
kill() {
3942
this.process!.kill("SIGKILL");
43+
// eslint-disable-next-line no-console
4044
console.log("Killed", this.process!.killed);
4145
}
4246
}

packages/sequencer/test-integration/workers/modules.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import { Runtime } from "@proto-kit/module";
22
import { Protocol } from "@proto-kit/protocol";
3+
// eslint-disable-next-line import/no-extraneous-dependencies
34
import { VanillaProtocolModules } from "@proto-kit/library";
45
import { ModulesConfig } from "@proto-kit/common";
6+
// eslint-disable-next-line import/no-extraneous-dependencies
57
import { BullQueueConfig } from "@proto-kit/deployment";
68

79
import { ProvenBalance } from "../../test/integration/mocks/ProvenBalance";

packages/sequencer/test-integration/workers/worker.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ describe("worker", () => {
6565
.containerEvents.on("ready", res);
6666
});
6767

68+
expect(ready).toBe(true);
69+
6870
console.log("Ready received!");
6971

7072
await sleep(10000000);

0 commit comments

Comments
 (0)