Add tests for lib/ml.js
Background
We have added code to run predictions on machine learning models in #25 (closed), however that code is missing unit tests and integration tests. This is a problem, as without tests both the ML snippets and ML code is hard to modify and maintain.
What to change
Write tests for lib/ml.js
based on the guidelines in #87.
The tests should cover the following APIs:
-
ML
class- constructor
-
modelURL
property -
predict()
method
For some idea of how to structure the tests, see test/caching.js
.
Edited by Manish Jethani