mozilla / eslint-plugin-amo

⛑ ESLint plugin for AMO.
https://www.npmjs.com/package/eslint-plugin-amo
Mozilla Public License 2.0
6 stars 5 forks source link

Add a rule to call `sinon.assert.calledOnce()` after `sinon.assert.calledWith()` #6

Open willdurand opened 6 years ago

willdurand commented 6 years ago
// BAD
sinon.assert.calledOnce(stub);
sinon.assert.calledWith(stub, params);

// GOOD
sinon.assert.calledWith(stub, params);
sinon.assert.calledOnce(stub);

We should consider sinon.assert.calledOnce() and other callCount().

bhagyamudgal commented 3 years ago

Can I do this?

willdurand commented 3 years ago

I think so but it might not be super interesting to you. This ESLint plugin is specific to AMO. You can maybe find more "user-facing" issues by looking at the opened contrib: welcome issues.

bhagyamudgal commented 3 years ago

@willdurand Ok.