I am getting "unhandled rejection" messages in mocha tests but I am at lost what is the exact source of the problem since this happens asynchronously. 

I know that I can add an event listener for the global unhandledRejection event like:

```
process.on('unhandledRejection', function(reason)  {
     console.error(reason);
     process.exit(1);
});

```

but that doesn't really help, since the trace is then like follows:

```
{ Error: ENOENT: no such file or directory, open '/tmp/testfile.json'
    at Error (native)
  cause: 
   { Error: ENOENT: no such file or directory, open '/tmp/testfile.json'
       at Error (native)
     errno: -2,
     code: 'ENOENT',
     syscall: 'open',
     path: '/tmp/testfile.json' },
  isOperational: true,
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/tmp/testfile.json' }

```

The problem is the same with the node's inbuilt handler. No backtrace.

Apparently I don't get a proper backtrace because the rejection happens in the native fs module.
If I try to run just the test where this trace happens, it doesn't happen at all. It is probably because of a runaway promise that was set up somewhere "earlier". The specified /tmp/ path doesn't exist anywhere in the test code or the actual implementation code. The testfile.json does exist but not in that path.

I am running mocha 3.5.3 with node 6.5.0.

So the question then is: how to narrow down to find the problematic code?