js-backend: reuse assert functions in testData