anchor/examples/tutorial/basic-0/tests/basic-0.js

17 lines
480 B
JavaScript

const anchor = require("@coral-xyz/anchor");
describe("basic-0", () => {
// Configure the client to use the local cluster.
anchor.setProvider(anchor.AnchorProvider.local());
it("Uses the workspace to invoke the initialize instruction", async () => {
// #region code
// Read the deployed program from the workspace.
const program = anchor.workspace.Basic0;
// Execute the RPC.
await program.methods.initialize().rpc();
// #endregion code
});
});