Unhandled rejections in ecschema-metadata
I've been migrating ecschema-metadata over to using just vitest for the test framework (in draft PR). At the time of writing, all tests pass and the pkg is able to be built.
When I was testing the migration out, vitest alerted me to a large number of unhandled promise rejections (vitest is very strict on this, compared to chai)
The rejections are coming from two places in ecschema metadata: The SchemaCache, and SchemaLoaderController:
Wanted to highlight this, as to fix it would require changes in source code. The changes are very tiny though, I put it in an explicitly separate commit: https://github.com/iTwin/itwinjs-core/pull/7298/commits/2005c208b341ae783e8a753da35462cf4a6e66ee
But, I wanted to leave this issue up here first, and ask for feedback on whether this change should be a part of the migration draft PR or open a different PR addressing it. These solutions doesn't change the tests, as they still expect errors to be thrown, and even with a .catch(), those errors are still detected.