JS backend: fixed extra compilation in inline tests and minor refactoring in tests.