test.ts 592 B

12345678910111213141516
  1. import * as anchor from "@coral-xyz/anchor";
  2. import { 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
  7. .ProcessingInstructions as anchor.Program<ProcessingInstructions>;
  8. it("Go to the park!", async () => {
  9. // Again, Anchor makes it super simple.
  10. //
  11. await program.methods.goToPark("Jimmy", 3).accounts({}).rpc();
  12. await program.methods.goToPark("Mary", 10).accounts({}).rpc();
  13. });
  14. });