(value: T, message?: string)
| 102 | // a = null; |
| 103 | // shouldExist(a); /* throws should.exist assertion |
| 104 | export function shouldExist<T>(value: T, message?: string): value is Exclude<T, null | undefined> { |
| 105 | // TODO: if the message is set we should have a proper message here; since the move to vitest we lost it. |
| 106 | expect(value).toEqual(expect.anything()); |
| 107 | return true; |
| 108 | } |
| 109 | |
| 110 | /*** |
| 111 | * Absolute path to the root of the tests |