Skip to content

Commit

Permalink
fix: test and changed global target to ESNEXT
Browse files Browse the repository at this point in the history
  • Loading branch information
isordo committed Sep 14, 2023
1 parent 06811f2 commit 4f2840e
Show file tree
Hide file tree
Showing 17 changed files with 483 additions and 19 deletions.
463 changes: 463 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
"@babel/preset-env": "^7.22.15",
"@types/bs58check": "2.1.0",
"@types/chai-as-promised": "7.1.6",
"@types/jest": "^29.5.4",
"@types/mocha": "10.0.1",
"@types/node": "20.6.0",
"@types/sinon": "10.0.16",
Expand Down
2 changes: 1 addition & 1 deletion packages/beacon-blockchain-substrate/tsconfig-cjs.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"target": "es5",
"target": "es6",
"module": "commonjs",
"outDir": "./dist/cjs"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/beacon-blockchain-tezos-sapling/tsconfig-cjs.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"target": "es5",
"target": "es6",
"module": "commonjs",
"outDir": "./dist/cjs"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/beacon-blockchain-tezos/tsconfig-cjs.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"target": "es5",
"target": "es6",
"module": "commonjs",
"outDir": "./dist/cjs"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/beacon-core/tsconfig-cjs.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"target": "es5",
"target": "es6",
"module": "commonjs",
"outDir": "./dist/cjs"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/beacon-dapp/tsconfig-cjs.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"target": "es5",
"target": "es6",
"module": "commonjs",
"outDir": "./dist/cjs"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/beacon-sdk/tsconfig-cjs.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"target": "es5",
"target": "es6",
"module": "commonjs",
"outDir": "./dist/cjs"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/beacon-transport-matrix/tsconfig-cjs.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"target": "es5",
"target": "es6",
"module": "commonjs",
"outDir": "./dist/cjs"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/beacon-transport-postmessage/tsconfig-cjs.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"target": "es5",
"target": "es6",
"module": "commonjs",
"outDir": "./dist/cjs"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/beacon-transport-walletconnect/tsconfig-cjs.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"target": "es5",
"target": "es6",
"module": "commonjs",
"outDir": "./dist/cjs"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/beacon-types/tsconfig-cjs.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"target": "es5",
"target": "es6",
"module": "commonjs",
"outDir": "./dist/cjs"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/beacon-ui/tsconfig-cjs.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"target": "es5",
"target": "es6",
"module": "commonjs",
"outDir": "./dist/cjs"
}
Expand Down
6 changes: 3 additions & 3 deletions packages/beacon-utils/__tests__/exposed-promise.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const getExpectedPromiseOutcome = (
})
.catch(() => undefined)
const timeout = global.setTimeout(() => {
;(resolvePredicate ? reject : resolve)()
resolvePredicate ? reject() : resolve(undefined)
}, WAIT_TIME)
}).catch(() => undefined)
)
Expand All @@ -54,7 +54,7 @@ const getExpectedPromiseOutcome = (
cancelTimeoutAndSettle(timeout, rejectPredicate ? resolve : reject)(result)
})
const timeout = global.setTimeout(() => {
;(rejectPredicate ? reject : resolve)()
;rejectPredicate ? reject() : resolve(undefined)
}, WAIT_TIME)
}).catch(() => undefined)
)
Expand All @@ -67,7 +67,7 @@ const getExpectedPromiseOutcome = (
cancelTimeoutAndSettle(timeout, finallyPredicate ? resolve : reject)()
})
const timeout = global.setTimeout(() => {
;(finallyPredicate ? reject : resolve)()
;finallyPredicate ? reject() : resolve(undefined)
}, WAIT_TIME)
}).catch(() => undefined)
)
Expand Down
2 changes: 1 addition & 1 deletion packages/beacon-utils/tsconfig-cjs.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"target": "es5",
"target": "es6",
"module": "commonjs",
"outDir": "./dist/cjs"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/beacon-wallet/tsconfig-cjs.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"target": "es5",
"target": "es6",
"module": "commonjs",
"outDir": "./dist/cjs"
}
Expand Down
6 changes: 3 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"compilerOptions": {
"target": "ES2015",
"target": "ESNext",
"lib": ["es2015", "es2017.string", "dom"],
"module": "esnext",
"module": "ESNext",
"moduleResolution": "node",
"declaration": true,
"outDir": "./dist/esm",
"typeRoots": ["./node_modules/@types", "./src/typings", "./node_modules"],
"types": ["vite/client", "node", "chrome"],
"types": ["vite/client", "node", "chrome", "jest"],
"sourceMap": true,
"baseUrl": ".",
/* Strict Type-Checking Options */
Expand Down

0 comments on commit 4f2840e

Please sign in to comment.