-
Notifications
You must be signed in to change notification settings - Fork 248
Open
Description
Some of our developers write tests with multiple done()s in them. This obviously isn't correct, as tests should run (and complete) the same way every time. An example might be:
myObservable$.subscribe({
next: (result) => {
expect(result).toBe('foo');
done();
},
error: (err) => {
done(): // this is wrong. it should fail the test if error happens
}
});
Is there an existing rule that can catch this?
Whether this rule exists or not, I've been considering writing some custom lint rules for our codebase to handle our specific best practices.
Can we leverage some of the existing code/utilities in this lib to do that? If so, are there any guidelines?
Thanks in advance
Metadata
Metadata
Assignees
Labels
No labels