test.ts 619 B

1234567891011121314151617181920212223
  1. import * as anchor from "@project-serum/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.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)
  11. .accounts({})
  12. .rpc();
  13. await program.methods.goToPark("Mary", 10)
  14. .accounts({})
  15. .rpc();
  16. });
  17. });