-
Notifications
You must be signed in to change notification settings - Fork 68
Open
Description
Summary
I came against rule activation on calls on ECMAScript Symbol
class.
I think it should not happen, as it does not affect the global state.
Details
This rule reports all function calls and use of the dot operator (due to getters and setters) directly in describe blocks.
This code is rejected
const assert = require('assert/strict');
describe('no-setup-in-describe', () => {
// ESLint: Unexpected function call in describe block.(mocha/no-setup-in-describe)
const foo = Symbol('bar');
it('foo should not be null', async () => {
assert.notStrictEqual(foo, null);
});
});
Symbol does merely instantiate a non-mutable object.
Configuration:
- node 16.5
- eslint 7.27
- eslint-plugin-mocha 9.0
Metadata
Metadata
Assignees
Labels
No labels