You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by an...@apache.org on 2015/09/08 16:13:29 UTC

cordova-plugin-media git commit: CB-9619 Fixed tests waiting for precise position

Repository: cordova-plugin-media
Updated Branches:
  refs/heads/master 4321b3f07 -> b1704a992


CB-9619 Fixed tests waiting for precise position


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/commit/b1704a99
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/tree/b1704a99
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/diff/b1704a99

Branch: refs/heads/master
Commit: b1704a992a2a0861ed9d89fe56f10147841c48f0
Parents: 4321b3f
Author: Alexander Sorokin <al...@akvelon.com>
Authored: Mon Sep 7 18:46:07 2015 +0300
Committer: Alexander Sorokin <al...@akvelon.com>
Committed: Mon Sep 7 18:46:07 2015 +0300

----------------------------------------------------------------------
 tests/tests.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-media/blob/b1704a99/tests/tests.js
----------------------------------------------------------------------
diff --git a/tests/tests.js b/tests/tests.js
index bbf7c1e..6a6bb45 100644
--- a/tests/tests.js
+++ b/tests/tests.js
@@ -281,7 +281,7 @@ exports.defineAutoTests = function () {
                         }
 
                         media.getCurrentPosition(function (position) {
-                            expect(position).toBe(20);
+                            expect(position).toBeCloseTo(20, 0);
                             context.done = true;
                             done();
                         }, failed.bind(null, done, 'media1.getCurrentPosition - Error getting media current position', context))
@@ -313,7 +313,7 @@ exports.defineAutoTests = function () {
                             if (context.done) return;
                             media.seekTo(5000);
                             media.getCurrentPosition(function (position) {
-                                expect(position).toBe(5);
+                                expect(position).toBeCloseTo(5, 0);
                                 context.done = true;
                                 done();
                             }, failed.bind(null, done, 'media1.getCurrentPosition - Error getting media current position', context));


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org