(config: RunVitestConfig)
| 33 | }) |
| 34 | |
| 35 | function runUnhandledTest(config: RunVitestConfig) { |
| 36 | return runInlineTests({ |
| 37 | 'throw-errors.test.js': /* js */` |
| 38 | import { test } from "vitest" |
| 39 | |
| 40 | test("Some test", () => { |
| 41 | // |
| 42 | }) |
| 43 | |
| 44 | new Promise((_, reject) => reject(new Error("intentional unhandled error"))) |
| 45 | `, |
| 46 | }, config, { fails: true }) |
| 47 | } |
| 48 | }) |
| 49 | |
| 50 | test('unhandled rejections of main thread are reported even when no reporter is used', async () => { |
no test coverage detected