Skip to content

Commit 158acc9

Browse files
[js-client] Add tsc --noEmit to the js client test script and fix type error (#885)
* add `tsc --noEmit` to the js client test script * check blockhash check on js client test
1 parent 2a7fc4c commit 158acc9

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

clients/js/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"scripts": {
2222
"build": "rimraf dist && tsup && tsc -p ./tsconfig.declarations.json",
2323
"build:docs": "typedoc",
24-
"test": "ava",
24+
"test": "tsc --noEmit && ava",
2525
"lint": "eslint --ext js,ts,tsx src",
2626
"lint:fix": "eslint --fix --ext js,ts,tsx src",
2727
"format": "prettier --check src test",

clients/js/test/_setup.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {
1414
airdropFactory,
1515
appendTransactionMessageInstructions,
1616
assertIsSendableTransaction,
17+
assertIsTransactionWithBlockhashLifetime,
1718
createSolanaRpc,
1819
createSolanaRpcSubscriptions,
1920
createTransactionMessage,
@@ -89,6 +90,7 @@ export const signAndSendTransaction = async (
8990
await signTransactionMessageWithSigners(transactionMessage);
9091
const signature = getSignatureFromTransaction(signedTransaction);
9192
assertIsSendableTransaction(signedTransaction);
93+
assertIsTransactionWithBlockhashLifetime(signedTransaction);
9294
await sendAndConfirmTransactionFactory(client)(signedTransaction, {
9395
commitment,
9496
});

0 commit comments

Comments
 (0)