basic-0.js 494 B

123456789101112131415161718
  1. const anchor = require('@project-serum/anchor');
  2. const fs = require('fs');
  3. describe('basic-0', () => {
  4. // Configure the client to use the local cluster.
  5. anchor.setProvider(anchor.Provider.local());
  6. it('Uses the workspace to invoke the initialize instruction', async () => {
  7. // #region code
  8. // Read the deployed program from the workspace.
  9. const program = anchor.workspace.Basic0;
  10. // Execute the RPC.
  11. await program.rpc.initialize();
  12. // #endregion code
  13. });
  14. });