I'm new to WebStorm, and fairly new to Node development. I am working on an existing project, and want to have code completion for my node_modules. More specifically, I'm using Chai and WebStorm doesn't seem to find the .have
member of my expect.to
statement.
This is my code, simplified:
var expect = require('chai').expect;
import {Customer} from '../../app/model/Customer.js';
describe('...', function() {
it('...', function() {
var customer = new Customer();
expect(customer).to.have.property('name');
});
});
I get squiggly lines under the have
call, and WebStorm tells me Unresolved variable have
.
If I F12 on the to
, WebStorm takes me to another node module, shelljs, but I haven't imported that one.
Is this because WebStorm can't resolve everything in javascript?
I've enabled Coding Assistance for NodeJS as per the docs, but that made no difference.