[CDE-252]: Replicated javascript unit test logic to pentaho5