Hey @dan-i
I am getting the below error while trying to test:
aadyakalra@Aadyas-MacBook-Air Helloworld % ./node_modules/.bin/truffle compile
Compiling your contractsâŚ
Everything is up to date, there is nothing to compile.
aadyakalra@Aadyas-MacBook-Air Helloworld % ./node_modules/.bin/truffle console
truffle(ganache)> test
ExtendableError: Unknown network âganacheâ. See your Truffle configuration file for available networks.
at Object.validateNetworkConfig (/Users/aadyakalra/Documents/Ethereum-course-advanced/Helloworld/node_modules/truffle/build/webpack:/packages/environment/environment.js:110:1)
at Object.detect (/Users/aadyakalra/Documents/Ethereum-course-advanced/Helloworld/node_modules/truffle/build/webpack:/packages/environment/environment.js:16:1)
at Object.run (/Users/aadyakalra/Documents/Ethereum-course-advanced/Helloworld/node_modules/truffle/build/webpack:/packages/core/lib/commands/test/index.js:142:1)
at Command.run (/Users/aadyakalra/Documents/Ethereum-course-advanced/Helloworld/node_modules/truffle/build/webpack:/packages/core/lib/command.js:136:1)
at Object. (/Users/aadyakalra/Documents/Ethereum-course-advanced/Helloworld/node_modules/truffle/build/webpack:/packages/core/lib/console-child.js:39:1)
at webpack_require (/Users/aadyakalra/Documents/Ethereum-course-advanced/Helloworld/node_modules/truffle/build/webpack:/webpack/bootstrap:19:1)
at /Users/aadyakalra/Documents/Ethereum-course-advanced/Helloworld/node_modules/truffle/build/webpack:/webpack/bootstrap:83:1
at Object. (/Users/aadyakalra/Documents/Ethereum-course-advanced/Helloworld/node_modules/truffle/build/consoleChild.bundled.js:89:10)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensionsâŚjs (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
truffle(ganache)>
Even the Migration of my Contracts is happening fine, donât know why the test is saying "unknown network ganache"
and below is my Helloworldtest.js file
const Helloworld = artifacts.require("Helloworld");
contract("Helloworld", async function(){
it("should initialize correctly", async function(){
let instance = await Helloworld.deployed();
let message = await instance.getMessage();
assert(message === "Hello again !");
});
});
Please help
Do you need me to share something else?