Hi @rwfresh
when I clone your repo, there was a missing aeproject-lib
=> npm i aeproject-lib --save
and I refactored some of your code
// some code
...
...
...
describe('Interact with contract', () => {
let contractInstance;
beforeEach(async () => {
contractSource = utils.readFileRelative('./contracts/ToDoManager.aes', "utf-8"); // ! this line was missing. you can read the file above first describe or in first before
contractInstance = await owner.getContractInstance(contractSource); // contractSource was null
// deploy returns tx info not contract instance
await contractInstance.deploy();
// console.log("DEPLOYED CONTRACT:", deployedContract);
});
describe('Contract functionality', () => {
describe('Create a task', () => {
it.only('should create a task successfully', async () => {
//Arrange
const taskName = 'Task A';
//Act
const addTaskResult = await contractInstance.call('add_to_do', [taskName]);
console.log('addTaskResult')
console.log(addTaskResult)
// assert.isFulfilled(addTaskPromise, 'Could not call add_to_do');
// const taskCreationResult = await addTaskPromise;
//Assert
// const taskCreationResultDecoded = await taskCreationResult.decode("string");
// assert.equal(taskCreationResultDecoded.value, taskName)
});
});
...
...
...
Best,
Aleksey