For truffle, a generated test for a contract looks like this:
var PaymentRequest = artifacts.require("PaymentRequest");
contract("PaymentRequest", accounts => {
it("should assert true", done => {
var paymentRequest = PaymentRequest.deployed();
assert.isTrue(true);
done();
});
});
The problem I have is that IntelliJ is not able to understand artifact
, contract
, it
, .deployed()
and .isTrue(true)
. Since this is my first time working on a Etherium project this is quite annoying experience, since my editor is screaming at me that I'm doing it wrong.
Without eslint I get hints from IntelliJ like 'unresolved variable or type artifacts'. When eslint is enabled it tells me that it is not defined. However if I run the test, it works fine. In other projects (such as Angular) I do not have such issues.
How do I start to fix this mess? And why is this happening? Is this lack of code hinting something that isn't implemented by the authors of Truffle, or is my IntelliJ config messed up?