To refine the JavaScript code, we need some relatively compact schemata that cover the edge cases. None of the testutils services quite do the job. It is possible that the content in here could be refactored with testutils.