Sorry, Mocha is unlikely to support anything like this. It's too far away from the idea of mock objects. Can you not refactor the code so that you can write sensible unit tests around the defect? -- James. http://blog.floehopper.org