Add mocha to dev deps
Better extend example
Test case for extend