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 5
5
} from '@solana/web3.js' ;
6
6
import { start } from 'solana-bankrun' ;
7
7
import { describe , test } from 'node:test' ;
8
+ import { assert } from "chai" ;
8
9
9
10
describe ( 'hello-solana' , async ( ) => {
10
11
// load program in solana-bankrun
@@ -28,6 +29,12 @@ describe('hello-solana', async () => {
28
29
29
30
// Now we process the transaction
30
31
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
+ } ) ;
33
40
} ) ;
You can’t perform that action at this time.
0 commit comments