title: Unit testing C++ v8 addon
body: <p>We are writing a v8 addon for node.js.</p>
  
  <p>The addon (as you may well know) is a C++ dll.</p>
  
  <p>How do we unit test this?</p>
  
  <p>The simple way is to use node.js scripts to call our exported functions from the addon dll. But this is not a true unit test, as it's across languages.</p>
  
  <p>Has anyone managed to successfully write a C++ unit test for their addon dll?</p>
  
  <p>We have tried, but are getting unexpected errors - we suspect this is because the node-gyp libraries expect everything to be called in the context of node.exe, and because our unit test uses the addon dll "standalone", some things are not getting setup correctly, causing the test to fall over.</p>
  
  <p>If you have managed to use C++ unit tests for v8 addon, please can you detail the best way to do it, and things to look out for?</p>
  
  <p>regards,
  Stretch</p>