-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
accepting prsGo ahead, send a pull request that resolves this issueGo ahead, send a pull request that resolves this issuelocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.Please open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.repo maintenancethings to do with maintenance of the repo, and not with code/docsthings to do with maintenance of the repo, and not with code/docs
Description
Suggestion
If you throw an exception in a rule (within the RuleListener object handlers, not at the top level of the create()
function), the whole test suite fails with an unhelpful error message, rather than failing just the individual test run and printing a useful error message. For instance, here's what happens when I throw an exception in a line affected by just one test case:
FAIL tests/rules/no-unnecessary-type-arguments.test.ts
● Test suite failed to run
TypeError: Converting circular structure to JSON
--> starting at object with constructor 'Object'
| property 'params' -> object with constructor 'Array'
| index 0 -> object with constructor 'Object'
--- property 'parent' closes the circle
at stringify (<anonymous>)
@JoshuaKGoldberg has a hacky workaround. Feel free to share in case that makes it easier to pinpoint the root cause?
danvk
Metadata
Metadata
Assignees
Labels
accepting prsGo ahead, send a pull request that resolves this issueGo ahead, send a pull request that resolves this issuelocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.Please open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.repo maintenancethings to do with maintenance of the repo, and not with code/docsthings to do with maintenance of the repo, and not with code/docs