Skip to content

Commit 65f5c8a

Browse files
committed
fix: run test in /dist to avoid strip-only mode for node 24
TICKET: WP-5182
1 parent fd5b0f1 commit 65f5c8a

File tree

7 files changed

+884
-34
lines changed

7 files changed

+884
-34
lines changed

modules/bitgo/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@
2626
"webpack-dev": "cross-env NODE_ENV=development webpack",
2727
"webpack-prod": "NODE_OPTIONS=--max-old-space-size=4096 cross-env NODE_ENV=production webpack",
2828
"test": "npm run coverage",
29-
"unit-test": "mocha 'test/v2/unit/**/*.ts' 'test/unit/**/*.ts'",
29+
"unit-test": "mocha 'dist/test/v2/unit/**/*.js' 'dist/test/unit/**/*.js'",
3030
"coverage": "nyc -- npm run unit-test",
3131
"integration-test": "nyc -- mocha \"test/v2/integration/**/*.ts\"",
3232
"browser-test": "karma start karma.conf.js",
3333
"lint": "eslint --quiet .",
3434
"audit": "if [ \"$(npm --version | cut -d. -f1)\" -ge \"6\" ]; then npm audit; else echo \"npm >= 6 required to perform audit. skipping...\"; fi",
3535
"clean": "rm -r dist/*",
36-
"build": "yarn tsc --build --incremental --verbose .",
36+
"build": "yarn tsc --build --incremental --verbose . && cpx \"test/v2/unit/internal/tssUtils/ecdsaMPCv2/fixtures/**/*\" dist/test/v2/unit/internal/tssUtils/ecdsaMPCv2/fixtures",
3737
"prepare": "npm run build",
3838
"prepublishOnly": "npm run compile",
3939
"upload-artifacts": "node scripts/upload-test-reports.js",
@@ -145,6 +145,7 @@
145145
"@types/jasmine": "^3.5.12",
146146
"@types/lodash": "^4.14.121",
147147
"aws-sdk": "^2.1155.0",
148+
"cpx": "^1.5.0",
148149
"io-ts-types": "^0.5.16",
149150
"karma": "^5.1.1",
150151
"karma-chrome-launcher": "^3.1.0",

modules/bitgo/test/v2/unit/accountConsolidations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { common, Wallet } from '@bitgo/sdk-core';
1212

1313
import { TestBitGo } from '@bitgo/sdk-test';
1414
import { BitGo } from '../../../src/bitgo';
15-
const algoFixtures = require('../../../../sdk-coin-algo/test/fixtures/algo');
15+
const algoFixtures = require('../../../../../sdk-coin-algo/test/fixtures/algo');
1616

1717
nock.disableNetConnect();
1818

modules/bitgo/test/v2/unit/mmi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { BitGo } from '../../../src/bitgo';
44
import nock from 'nock';
55
import { bip32 } from '@bitgo/utxo-lib';
66
import { common, TransactionType } from '@bitgo/sdk-core';
7-
import { AvaxC as AvaxCAccountLib, getBuilder } from '../../../../account-lib';
7+
import { AvaxC as AvaxCAccountLib, getBuilder } from '@bitgo/account-lib';
88

99
nock.enableNetConnect();
1010

modules/sdk-coin-trx/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"prepare": "npm run build-ts && shx cp -r ./resources ./dist",
1515
"test": "npm run coverage",
1616
"coverage": "nyc -- npm run unit-test",
17-
"unit-test": "yarn run build && node --test",
17+
"unit-test": "yarn run build && node --test dist/test/**/*.js",
1818
"gen-protobuf": "pbjs -t static-module -w commonjs -o ./resources/protobuf/tron.js ./resources/protobuf/Discover.proto ./resources/protobuf/Contract.proto ./resources/protobuf/tron.proto",
1919
"gen-protobufts": "pbts -o ./resources/protobuf/tron.d.ts ./resources/protobuf/tron.js"
2020
},

modules/utxo-core/package.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@
2020
"./testutil/descriptor": "./dist/src/testutil/descriptor/index.js"
2121
},
2222
"scripts": {
23-
"build": "yarn tsc --build --incremental --verbose .",
23+
"build": "yarn tsc --build --incremental --verbose . && cpx \"test/descriptor/psbt/fixtures/**/*\" dist/test/descriptor/psbt/fixtures",
2424
"fmt": "prettier --write .",
2525
"check-fmt": "prettier --check .",
2626
"clean": "rm -r ./dist",
2727
"lint": "eslint --quiet .",
2828
"prepare": "npm run build",
2929
"test": "npm run unit-test",
30-
"unit-test": "mocha --recursive test/"
30+
"unit-test": "mocha --recursive \"dist/test/**/*.js\""
3131
},
3232
"author": "BitGo SDK Team <[email protected]>",
3333
"license": "MIT",
@@ -45,6 +45,7 @@
4545
"publishConfig": {
4646
"access": "public"
4747
},
48+
"type": "commonjs",
4849
"nyc": {
4950
"extension": [
5051
".ts"
@@ -57,5 +58,8 @@
5758
"bip174": "npm:@bitgo-forks/[email protected]",
5859
"bitcoinjs-message": "npm:@bitgo-forks/[email protected]"
5960
},
60-
"gitHead": "18e460ddf02de2dbf13c2aa243478188fb539f0c"
61+
"gitHead": "18e460ddf02de2dbf13c2aa243478188fb539f0c",
62+
"devDependencies": {
63+
"cpx": "^1.5.0"
64+
}
6165
}

modules/utxo-staking/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88
"dist/src"
99
],
1010
"scripts": {
11-
"build": "yarn tsc --build --incremental --verbose .",
11+
"build": "yarn tsc --build --incremental --verbose . && cpx \"test/fixtures/**/*\" dist/test/fixtures",
1212
"fmt": "prettier --write .",
1313
"check-fmt": "prettier --check .",
1414
"clean": "rm -r ./dist",
1515
"lint": "eslint --quiet .",
1616
"prepare": "npm run build",
1717
"coverage": "nyc -- npm run unit-test",
18-
"unit-test": "mocha --recursive test"
18+
"unit-test": "mocha --recursive \"dist/test/**/*.js\""
1919
},
2020
"author": "BitGo SDK Team <[email protected]>",
2121
"license": "MIT",
@@ -41,6 +41,7 @@
4141
".ts"
4242
]
4343
},
44+
"type": "commonjs",
4445
"dependencies": {
4546
"@babylonlabs-io/babylon-proto-ts": "1.0.0",
4647
"@bitgo/babylonlabs-io-btc-staking-ts": "^2.4.0",
@@ -55,6 +56,7 @@
5556
"io-ts-types": "^0.5.19"
5657
},
5758
"devDependencies": {
59+
"cpx": "^1.5.0",
5860
"yargs": "^17.7.2"
5961
}
6062
}

0 commit comments

Comments
 (0)