Skip to content

Commit

Permalink
add SoulFactory test initial code
Browse files Browse the repository at this point in the history
  • Loading branch information
miquelcabot committed Sep 1, 2022
1 parent ac7db5a commit c26d166
Showing 1 changed file with 39 additions and 1 deletion.
40 changes: 39 additions & 1 deletion test_factory/SoulFactory.test.ts
@@ -1 +1,39 @@
console.log('test factory');
import chai from "chai";
import chaiAsPromised from "chai-as-promised";
import { solidity } from "ethereum-waffle";
import { ethers, deployments } from "hardhat";
import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers";
import { SoulFactory, SoulFactory__factory } from "../typechain";

chai.use(chaiAsPromised);
chai.use(solidity);
const expect = chai.expect;

// contract instances
let soulFactory: SoulFactory;

let owner: SignerWithAddress;
let address1: SignerWithAddress;
let address2: SignerWithAddress;

describe("Soul Factory", () => {
before(async () => {
[, owner, address1, address2] = await ethers.getSigners();
});

beforeEach(async () => {
await deployments.fixture("SoulFactory", { fallbackToGlobal: false });

const { address: soulFactoryAddress } = await deployments.get(
"SoulFactory"
);

soulFactory = SoulFactory__factory.connect(soulFactoryAddress, owner);
});

describe("purchase info", () => {
it("we can get purchase info", async () => {
console.log(await soulFactory.purchaseInfo());
});
});
});

0 comments on commit c26d166

Please sign in to comment.