1- import * as anchor from " @coral-xyz/anchor" ;
2- import { Program } from " @coral-xyz/anchor" ;
3- import { BN } from " bn.js" ;
4- import { TransferSol } from " ../target/types/transfer_sol" ;
1+ import * as anchor from ' @coral-xyz/anchor' ;
2+ import { Program } from ' @coral-xyz/anchor' ;
3+ import { BN } from ' bn.js' ;
4+ import { TransferSol } from ' ../target/types/transfer_sol' ;
55
6- describe ( " transfer_sol" , ( ) => {
6+ describe ( ' transfer_sol' , ( ) => {
77 //UTILS
88 const confirm = async ( signature : string ) : Promise < string > => {
99 const block = await provider . connection . getLatestBlockhash ( ) ;
@@ -28,14 +28,12 @@ describe("transfer_sol", () => {
2828 const airdropAmount = 2.5 * anchor . web3 . LAMPORTS_PER_SOL ;
2929 const transferAmount = 1 * anchor . web3 . LAMPORTS_PER_SOL ;
3030
31- it ( "Airdrop" , async ( ) => {
32- const airdropMaker = await provider . connection
33- . requestAirdrop ( maker . publicKey , airdropAmount )
34- . then ( confirm ) ;
35- console . log ( "\nAirdropped 5 SOL to maker" , airdropMaker ) ;
31+ it ( 'Airdrop' , async ( ) => {
32+ const airdropMaker = await provider . connection . requestAirdrop ( maker . publicKey , airdropAmount ) . then ( confirm ) ;
33+ console . log ( '\nAirdropped 5 SOL to maker' , airdropMaker ) ;
3634 } ) ;
3735
38- it ( " Transfer token" , async ( ) => {
36+ it ( ' Transfer token' , async ( ) => {
3937 // Add your test here.
4038 const tx = await program . methods
4139 . transferWithProgram ( new BN ( transferAmount ) )
@@ -45,6 +43,6 @@ describe("transfer_sol", () => {
4543 } )
4644 . signers ( [ maker ] )
4745 . rpc ( ) ;
48- console . log ( " Your transaction signature" , tx ) ;
46+ console . log ( ' Your transaction signature' , tx ) ;
4947 } ) ;
5048} ) ;
0 commit comments