Update tests.js
Merge branch 'master' into patch-1