| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| } | ||
|
|
||
| // before each | ||
| export function tearDown() { |
There was a problem hiding this comment.
Technically, this is executed after each test. There is a setUp() function for before each.
Sorry, something went wrong.
There was a problem hiding this comment.
yup - I want to cache the original ErrorHandler once and clean-up after each test to make sure the test does not leak side effects
Sorry, something went wrong.
| setErrorHandler({ | ||
| handlerError(error) { | ||
| called = true; | ||
| TKUnit.assert(error instanceof Error, "trace.error() wrap string in error") |
There was a problem hiding this comment.
Even if it's fine in this case, I think it's dangerous to use asserts in callbacks. It's better to cache the value and assert it after the assertion of the called variable. In cases where the callbacks are async asserting in them breaks the tests.
Sorry, something went wrong.
| export function write(message: any, category: string, type?: number); | ||
|
|
||
| /** | ||
| * Passes an error ot the registered ErrorHandler |
There was a problem hiding this comment.
typo - "ot" -> "to"
Sorry, something went wrong.
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Implements #5914