test.ts 592 B

123456789101112131415
  1. import * as anchor from '@coral-xyz/anchor';
  2. import type { ProcessingInstructions } from '../target/types/processing_instructions';
  3. describe('custom-instruction-data', () => {
  4. const provider = anchor.AnchorProvider.env();
  5. anchor.setProvider(provider);
  6. const program = anchor.workspace.ProcessingInstructions as anchor.Program<ProcessingInstructions>;
  7. it('Go to the park!', async () => {
  8. // Again, Anchor makes it super simple.
  9. //
  10. await program.methods.goToPark('Jimmy', 3).accounts({}).rpc();
  11. await program.methods.goToPark('Mary', 10).accounts({}).rpc();
  12. });
  13. });