js: add tests for motor class