JS tests for serialization