Add JavaScript test for constants in Consts.cpp.