Browse Source

Fix program keypair file and add assertions to verify program output (#72)

* Fix program keypair file and add assertions to verify program output

* Update basics/hello-solana/native/tests/test.ts

---------

Co-authored-by: Jacob Creech <82475023+jacobcreech@users.noreply.github.com>
asolana 1 year ago
parent
commit
1176ca2767

+ 1 - 1
basics/hello-solana/native/package.json

@@ -3,7 +3,7 @@
     "test": "pnpm ts-mocha -p ./tsconfig.json -t 1000000 ./tests/test.ts",
     "build-and-test": "cargo build-sbf --manifest-path=./program/Cargo.toml --sbf-out-dir=./tests/fixtures && pnpm test",
     "build": "cargo build-sbf --manifest-path=./program/Cargo.toml --sbf-out-dir=./program/target/so",
-    "deploy": "solana program deploy ./program/target/so/program.so"
+    "deploy": "solana program deploy ./program/target/so/hello_solana_program.so"
   },
   "dependencies": {
     "@solana/web3.js": "^1.47.3"

+ 2 - 1
basics/hello-solana/native/tests/test.ts

@@ -27,6 +27,7 @@ describe('hello-solana', async () => {
     tx.add(ix).sign(payer);
 
     // Now we process the transaction
-    await client.processTransaction(tx);
+    let transaction = await client.processTransaction(tx);
+    console.log(transaction?.meta?.logMessages);
   });
 });