Skip to content

Commit

Permalink
added testing primitives
Browse files Browse the repository at this point in the history
  • Loading branch information
RohanKapurDEV committed Sep 13, 2021
1 parent f96673e commit 822e833
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions tests/monaco.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
const anchor = require("@project-serum/anchor");

describe("monaco", () => {
// IDL
// Program idl
const idl = JSON.parse(require("fs").readFileSync("../target/idl/monaco.json", "utf8"));

// DEVNET Address
const programId = new anchor.web3.PublicKey("DXxoamtnFQ2Qg8WeSoF5ezgEZ6fST9iQTbpxkuFAr7Ld");
// Devnet program initialisation
const programId = new anchor.web3.PublicKey("394ZuAHtmQhHot1NzC4f5Q1UD2wWPvjz2N5RtWJr5Yo3");
anchor.setProvider(anchor.Provider.env());
const program = new anchor.Program(idl, programId);

it("Is initialized!", async () => {
// console.log(program.);
await program.rpc.initialize();
const main_wallet_priv = [
150, 62, 212, 97, 151, 171, 147, 120, 245, 181, 97, 145, 242, 7, 197, 212, 100, 34, 39, 168, 159, 67, 26, 172, 248,
105, 62, 152, 179, 106, 232, 0, 56, 216, 207, 211, 124, 95, 156, 132, 103, 126, 100, 122, 111, 154, 158, 8, 180,
233, 126, 41, 252, 211, 164, 230, 163, 33, 5, 154, 138, 158, 14, 186,
];

const main_wallet = anchor.web3.Keypair.fromSecretKey(Uint8Array.from(main_wallet_priv));

it("Test deposit", async () => {
await program.rpc.deposit();
});
});

0 comments on commit 822e833

Please sign in to comment.