File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
basics/hello-solana/native/tests Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 55} from '@solana/web3.js' ;
66import { start } from 'solana-bankrun' ;
77import { describe , test } from 'node:test' ;
8+ import { assert } from "chai" ;
89
910describe ( 'hello-solana' , async ( ) => {
1011 // load program in solana-bankrun
@@ -28,6 +29,12 @@ describe('hello-solana', async () => {
2829
2930 // Now we process the transaction
3031 let transaction = await client . processTransaction ( tx ) ;
31- console . log ( transaction ?. meta ?. logMessages ) ;
32- } ) ;
32+
33+ assert ( transaction . logMessages [ 0 ] . startsWith ( "Program " + PROGRAM_ID ) ) ;
34+ assert ( transaction . logMessages [ 1 ] === "Program log: Hello, Solana!" ) ;
35+ assert ( transaction . logMessages [ 2 ] === "Program log: Our program's Program ID: " + PROGRAM_ID ) ;
36+ assert ( transaction . logMessages [ 3 ] . startsWith ( "Program " + PROGRAM_ID + " consumed" ) ) ;
37+ assert ( transaction . logMessages [ 4 ] === "Program " + PROGRAM_ID + " success" ) ;
38+ assert ( transaction . logMessages . length == 5 ) ;
39+ } ) ;
3340} ) ;
You can’t perform that action at this time.
0 commit comments