-
Type: Task
-
Resolution: Won't Fix
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: AsyncWriter, Tech debt
-
Not Needed
Problem Description
A lot of tests in the async-writer check for errors being thrown in unsupported situations. These tests all follow the same pattern:
try {
operationThatShouldThrow(...);
{{ } catch (e) {}}
{{ expect(e.name).to.equal(...);}}
{{ ...}}
{{ }}}
However, if the operationThatShouldThrow does not throw, the test will still pass.
Solution
After operationThatShouldThrow there should always be an explicit fail() call to ensure the tests fails if no error is thrown.