Skip to content

Commit

Permalink
Tests partially working
Browse files Browse the repository at this point in the history
  • Loading branch information
troelsfr committed Nov 10, 2022
1 parent 0390dd0 commit 4ca7947
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 6 deletions.
8 changes: 8 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@

const config = {
testMatch: ["<rootDir>/zilliqa/js/**/test/?(*.)+(spec|test).(ts|js)"],
testURL: "http://localhost",
collectCoverage: true,
collectCoverageFrom: [
"<rootDir>/packages/*/src/**/*.{ts,js}",
"!**/node_modules/**",
],
automock: false,
resetMocks: false,
setupFiles: ["<rootDir>/jest-setup.js"],
};

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,14 @@
"hdkey": "^1.1.0",
"hmac-drbg": "^1.0.1",
"jest": "^27.1.3",
"ts-jest": "^27.1.3",
"jest-diff": "^29.3.1",
"jest-environment-jsdom": "^29.3.1",
"jest-fetch-mock": "3.0.3",
"jest-get-type": "^29.2.0",
"jest-matcher-utils": "^29.3.1",
"long": "^4.0.0",
"mitt": "^1.1.3",
"mock-socket": "^9.0.2",
"mock-socket": "^9.1.5",
"node-fetch": "^3.2.10",
"pbkdf2": "^3.0.16",
"pretty-format": "^29.3.1",
Expand Down Expand Up @@ -73,6 +72,7 @@
"styled-components": "^4.3.2",
"tailwindcss": "^3.1.8",
"terser": ">=5.7.1 <5.9.0",
"ts-jest": "^27.1.3",
"ts-loader": "8.0.4",
"tslib": "2.3.1",
"typescript": "^4.1.2",
Expand Down
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion zilliqa/js/blockchain/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ npm_package(

ts_project(
name = "test_src",
srcs = glob(
srcs = [
"//zilliqa/js:aes-js.d",
"//zilliqa/js:hmac-drbg.d",
"//zilliqa/js:pbkdf2.d",
] + glob(
[
"src/*.ts",
"src/**/*.ts",
Expand Down Expand Up @@ -92,6 +96,10 @@ ts_project(
"//:node_modules/@types/node",
"//:node_modules/@typescript-eslint/eslint-plugin",
"//:node_modules/@typescript-eslint/parser",
"//:node_modules/@zilliqa-js/account",
"//:node_modules/@zilliqa-js/core",
"//:node_modules/@zilliqa-js/crypto",
"//:node_modules/@zilliqa-js/util",
"//:node_modules/ansi-styles",
"//:node_modules/bn.js",
"//:node_modules/buffer-from",
Expand Down
12 changes: 11 additions & 1 deletion zilliqa/js/contract/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ npm_package(

ts_project(
name = "test_src",
srcs = glob(
srcs = [
"//zilliqa/js:aes-js.d",
"//zilliqa/js:hmac-drbg.d",
"//zilliqa/js:pbkdf2.d",
] + glob(
[
"src/*.ts",
"src/**/*.ts",
Expand Down Expand Up @@ -95,6 +99,11 @@ ts_project(
"//:node_modules/@types/node",
"//:node_modules/@typescript-eslint/eslint-plugin",
"//:node_modules/@typescript-eslint/parser",
"//:node_modules/@zilliqa-js/account",
"//:node_modules/@zilliqa-js/blockchain",
"//:node_modules/@zilliqa-js/core",
"//:node_modules/@zilliqa-js/crypto",
"//:node_modules/@zilliqa-js/util",
"//:node_modules/ansi-styles",
"//:node_modules/bn.js",
"//:node_modules/buffer-from",
Expand All @@ -109,6 +118,7 @@ ts_project(
"//:node_modules/pretty-format",
"//:node_modules/source-map",
"//:node_modules/tslib",
"//:node_modules/utility-types",
],
)

Expand Down
8 changes: 7 additions & 1 deletion zilliqa/js/subscriptions/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ npm_package(

ts_project(
name = "test_src",
srcs = glob(
srcs = [
"//zilliqa/js:aes-js.d",
] + glob(
[
"src/*.ts",
"src/**/*.ts",
Expand Down Expand Up @@ -85,6 +87,7 @@ ts_project(
"//:node_modules/@types/jest",
"//:node_modules/@types/long",
"//:node_modules/@types/node",
"//:node_modules/@types/websocket",
"//:node_modules/@typescript-eslint/eslint-plugin",
"//:node_modules/@typescript-eslint/parser",
"//:node_modules/ansi-styles",
Expand All @@ -97,10 +100,13 @@ ts_project(
"//:node_modules/jest-get-type",
"//:node_modules/jest-matcher-utils",
"//:node_modules/long",
"//:node_modules/mitt",
"//:node_modules/mock-socket",
"//:node_modules/node-fetch",
"//:node_modules/pretty-format",
"//:node_modules/source-map",
"//:node_modules/tslib",
"//:node_modules/websocket",
],
)

Expand Down

0 comments on commit 4ca7947

Please sign in to comment.