This is my test file:
const assert = require('assert');
const TOKEN_WASM_PATH = './contracts/group/group.wasm';
const TOKEN_ABI_PATH = './contracts/group/group.abi';
describe("EOSIO Group", function (eoslime) {
this.timeout(15000);
let groupContract;
let groupTable;
let adminAccount;
before(async () => {
adminAccount = await eoslime.Account.load('groupaccount','myPK','active');
});
before(async () => {
groupContract = eoslime.Contract.at(TOKEN_ABI_PATH, 'group', adminAccount);
groupTable = groupContract.groups;
});
it("Should create a new group", async () => {
await groupContract.upsertgroup("group2", "Assistant", "normal user include all users", "Common", 1,{ from: adminAccount.name });
});
It is giving error on eoslime test
:
1) EOSIO Group
UnhandledPromiseRejectionWarning: Error: Provided String is not an instance of BaseAccount
Should create a new group:
TypeError: groupContract.upsertgroup is not a function
at Context.it (tests/example-tests.js:37:27)
Contract name is "group", it is deployed on the account which is loaded here in before(). So, I don't need to deploy it here again. Only access contract and call its actions. Please help.