test($cordovaDevice): add unit tests