07-21-2023, 09:03 AM
I am writing JS UT for my NodeJS code. I am using [Chai][1] as the assertion library, and I prefer the *should* syntax. I also use *jslint* to check the JS file syntax, even the JS files for UT.
Now I have a problem with *jslint* and *Chai*. In *Chai*, you can use:
myvalue.should.be.true;
But *jslint* give me:
#1 Expected an assignment or function call and instead saw an expression.
I know *jslint* comes with many options, but I just cannot find the right one to turn off this check.
[1]:
Now I have a problem with *jslint* and *Chai*. In *Chai*, you can use:
myvalue.should.be.true;
But *jslint* give me:
#1 Expected an assignment or function call and instead saw an expression.
I know *jslint* comes with many options, but I just cannot find the right one to turn off this check.
[1]:
[To see links please register here]