7

I am trying to execute the built in until test provided in the metacoin example. I installed Mocha into my project.

I then execute this command: npm test from my console.

I am getting the following error:

C:\Dev\Blockchain\TruffleDemo\test\metacoin.js:1 (function (exports, require, module, __filename, __dirname) { var MetaCoin = artifacts.require("./MetaCoin.sol"); ^ ReferenceError: artifacts is not defined

Any ideas on what I might be missing? Thank you for the assistance!

2
  • 1
    Please run truffle test instead of npm test
    – rstormsf
    Jun 7 '17 at 17:19
  • @rstormsf - Thanks, that worked! If you want to post as the answer; I will mark it. Thanks again!
    – Flea
    Jun 7 '17 at 18:04
4

Run truffle test instead of npm test

1
  • I am already doing so...
    – Ozan Kurt
    Oct 18 at 9:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.