(func)
| 820 | } |
| 821 | |
| 822 | function runWithInvalidFD(func) { |
| 823 | let fd = 1 << 30; |
| 824 | // Get first known bad file descriptor. 1 << 30 is usually unlikely to |
| 825 | // be an valid one. |
| 826 | try { |
| 827 | while (fs.fstatSync(fd--) && fd > 0); |
| 828 | } catch { |
| 829 | return func(fd); |
| 830 | } |
| 831 | |
| 832 | printSkipMessage('Could not generate an invalid fd'); |
| 833 | } |
| 834 | |
| 835 | // A helper function to simplify checking for ERR_INVALID_ARG_TYPE output. |
| 836 | function invalidArgTypeHelper(input) { |
nothing calls this directly
no test coverage detected
searching dependent graphs…