scale-it/algo-builder

Mocha printing "ASA file not defined"

Closed this issue · 2 comments

Describe the bug

On running mocha tests, I am getting "ASA file not defined" printed on the console. This happens after I create the runtime.

I have a stateful smart contract .teal files in the assets folder but no ASA files

Expected Behavior

Nothing printed when there are not ASA files in assets folder

Current Behavior

Printing "ASA file not defined" when there are no ASA files in the assets folder.

image

Possible Solution

This issue possibly arises from this line called in the constructor of Runtime

this.loadedAssetsDefs = loadASAFile(this.store.accountNameAddress);

and the warning is printed here:

console.warn(warnMsg);

Steps to Reproduce

  1. Create a test case with before hook
  2. Add Runtime([]) call in the before hook
  3. The warning will get printed in the console when you run the test using npm test
    before(function () {
        // runs once before the first test in this block
        runtime = new Runtime([]);
    });

Environment

  • OS: Windows
  • Node.js version: 16.15.0
  • algob version: NA

Thank you for create the issue! We will fix it soon.
It's just warning so you can run test without worry about this message.

We was update algo-builder to better error/warning for deployASA in #715. Thank you!