Skip to content

Commit 746073b

Browse files
[js-client] Add tsc --noEmit to the js client test script and fix type error (#143)
add `tsc --noEmit` to test script
1 parent 54bcc13 commit 746073b

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

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 src",
2626
"lint:fix": "eslint --fix 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
@@ -12,6 +12,7 @@ import {
1212
airdropFactory,
1313
appendTransactionMessageInstructions,
1414
assertIsSendableTransaction,
15+
assertIsTransactionWithBlockhashLifetime,
1516
createSolanaRpc,
1617
createSolanaRpcSubscriptions,
1718
createTransactionMessage,
@@ -68,6 +69,7 @@ export const signAndSendTransaction = async (
6869
const signedTransaction = await signTransactionMessageWithSigners(transactionMessage);
6970
const signature = getSignatureFromTransaction(signedTransaction);
7071
assertIsSendableTransaction(signedTransaction);
72+
assertIsTransactionWithBlockhashLifetime(signedTransaction);
7173
await sendAndConfirmTransactionFactory(client)(signedTransaction, {
7274
commitment,
7375
});

clients/js/test/basic.test.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ import {
55
createRecord,
66
createWriteInstruction,
77
reallocateRecord,
8-
createSetAuthorityInstruction,
9-
createCloseRecordInstruction,
108
RECORD_META_DATA_SIZE,
119
} from '../src';
1210
import {
@@ -20,7 +18,6 @@ test('basic instructions flow', async t => {
2018
const payer = await generateKeyPairSignerWithSol(client);
2119

2220
const recordAuthority = await generateKeyPairSigner();
23-
const newRecordAuthority = await generateKeyPairSigner();
2421

2522
const initialRecordSize = 0n;
2623
const newRecordSize = 5n;

0 commit comments

Comments
 (0)