Fixed #624: add a condition in js-tests/main.js for Web

Add a condition in js-tests/main.js for Web