[js] add constants for field names
[js] add test application