Jest/karma example wording eslint rule
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
For RSpec, we now use the RSpec/ExampleWording cop to lint example titles. https://gitlab.com/gitlab-org/gitlab-ce/issues/59783
Enable RSpec/ExampleWording cop against using
shouldin RSpec example titles
The RSpec linter can also perform other cleanup like unneeded it. e.g. it 'it is a cake' {}
We have the same should cases in jest and karma.
I haven't looked into eslint options yet, just wanted to get an issue up.
// BAD
it('should return a cake', () => expect(cakeFactory(opts)).toBeInstanceOf(Cake));
end
// GOOD
it('returns a cake', () => expect(cakeFactory(opts)).toBeInstanceOf(Cake));
This could be the foundation/start of more linting for our specs. As a note, we also have issues with titles that don't provide much insight. e.g. describe('AppComponent', ()=>{})
Edited by 🤖 GitLab Bot 🤖