Skip to content

Commit 72f0fac

Browse files
authored
Merge pull request #120 from proto-kit/fix/test-cleanup-mar-23
Fixed tests, cleanup
2 parents 7591cb6 + 3fb7814 commit 72f0fac

File tree

115 files changed

+1984
-2073
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+1984
-2073
lines changed

.eslintrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,8 @@
139139
"@typescript-eslint/init-declarations": "off", //conflicts with beforeEach initialization
140140
"unicorn/consistent-function-scoping": "off", //Describe-level functions
141141
"@typescript-eslint/no-magic-numbers": "off",
142-
"jest/no-disabled-tests": "off" //For now
142+
"jest/no-disabled-tests": "off", //For now
143+
"import/no-extraneous-dependencies": "off"
143144
}
144145
},
145146
{

.github/workflows/pull-request-develop.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,5 @@ jobs:
8989
- name: "Build"
9090
run: npm run build
9191

92-
- name: "Reinstall monorepo packages"
93-
run: npm ci --workspaces --include-workspace-root
94-
9592
- name: "Test"
9693
run: npm run test:ci

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
script-shell=bash

package-lock.json

Lines changed: 66 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"build": "npx lerna run build",
99
"lint": "npx lerna run lint",
1010
"lint:staged": "eslint",
11-
"test": "npx lerna run test -- --passWithNoTests",
11+
"test": "npx lerna run test --scope=\"*/sdk\" -- --passWithNoTests",
1212
"test:ci": "npx lerna run test -- --passWithNoTests --forceExit",
1313
"test:watch": "npx lerna run test:watch",
1414
"commit": "cz",

packages/api/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"dev": "tsc -p tsconfig.json --watch",
1010
"lint": "eslint ./src ./test",
1111
"test:file": "node --experimental-vm-modules --experimental-wasm-modules --experimental-wasm-threads ../../node_modules/jest/bin/jest.js",
12-
"test": "npm run test:file -- ./src/** ./test/**",
13-
"test:watch": "npm run test:file -- ./src/** ./test/** --watch"
12+
"test": "npm run test:file -- ./test/**",
13+
"test:watch": "npm run test:file -- ./test/** --watch"
1414
},
1515
"main": "dist/index.js",
1616
"publishConfig": {

packages/api/src/graphql/modules/MempoolResolver.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,9 @@ export class MempoolResolver extends GraphqlModule {
129129
}
130130

131131
@Mutation(() => String)
132-
public submitTx(@Arg("tx") tx: TransactionObject): string {
132+
public async submitTx(@Arg("tx") tx: TransactionObject): Promise<string> {
133133
const decoded = PendingTransaction.fromJSON(tx);
134-
this.mempool.add(decoded);
134+
await this.mempool.add(decoded);
135135

136136
return decoded.hash().toString();
137137
}

packages/api/src/graphql/modules/QueryGraphqlModule.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ import {
4848
log,
4949
ModuleContainer,
5050
ModulesRecord,
51+
NonMethods,
5152
range,
5253
} from "@proto-kit/common";
5354
import { ObjMap } from "graphql/jsutils/ObjMap";
@@ -61,11 +62,6 @@ interface ProvableExtension<T, TJson = any> {
6162
fromJSON: (x: TJson) => T;
6263
}
6364

64-
type NonMethodKeys<Type> = {
65-
[Key in keyof Type]: Type[Key] extends Function ? never : Key;
66-
}[keyof Type];
67-
type NonMethods<Type> = Pick<Type, NonMethodKeys<Type>>;
68-
6965
interface AnyJson {
7066
[key: string]: any;
7167
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
describe("placeholder", () => {
2+
it("placeholder", () => {
3+
expect(1).toBe(1);
4+
});
5+
});

packages/cli/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"dev": "tsc -p tsconfig.json --watch",
1010
"lint": "eslint ./src ./test",
1111
"test:file": "node --experimental-vm-modules --experimental-wasm-modules --experimental-wasm-threads ../../node_modules/jest/bin/jest.js",
12-
"test": "npm run test:file -- ./src/** ./test/**",
13-
"test:watch": "npm run test:file -- ./src/** ./test/** --watch"
12+
"test": "npm run test:file -- ./test/**",
13+
"test:watch": "npm run test:file -- ./test/** --watch"
1414
},
1515
"publishConfig": {
1616
"access": "public"

0 commit comments

Comments
 (0)