这就是它在图片中向我展示的方式我在IntelliJ 中使用此代码,但我在代码中使用 Eslint 样式,它在某些关键字下为我提供了 carrels 行,例如“描述、它、.to.have.all .members”,我不知道为什么,即使我下载了 Mocha 和 Chai 也有人遇到这个问题。
describe('Test for Performance', function () {
it('maxPrimeSum(10000) should take <= 20ms', function () {
this.timeout(20);
chai.expect(maxPrimeSum(10000)).to.have.all.members([9521, 65]);
});
it('maxPrimeSum(100000) should take <= 200ms', function () {
this.timeout(200);
chai.expect(maxPrimeSum(100000)).to.have.all.members([92951, 183]);
});
});