Resolved CodeClimate warnings in tests/scripts/tests.js