js struct testing