From 69f1fbaa80fbdbd9bc02d30f0726db1d6093d85f Mon Sep 17 00:00:00 2001 From: "eddyverbruggen@gmail.com" Date: Wed, 22 Apr 2015 22:24:10 +0200 Subject: [PATCH] #4 test updates --- test/tests.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/test/tests.js b/test/tests.js index d21aacf..8507e5f 100644 --- a/test/tests.js +++ b/test/tests.js @@ -1,5 +1,5 @@ exports.defineAutoTests = function() { - + var fail = function (done) { expect(true).toBe(false); done(); @@ -20,6 +20,14 @@ exports.defineAutoTests = function() { expect(window.plugins.toast.show).toBeDefined(); }); + it("should define showWithOptions", function() { + expect(window.plugins.toast.showWithOptions).toBeDefined(); + }); + + it("should define optionsBuilder", function() { + expect(window.plugins.toast.optionsBuilder).toBeDefined(); + }); + it("should define showShortTop", function() { expect(window.plugins.toast.showShortTop).toBeDefined(); }); @@ -47,11 +55,7 @@ exports.defineAutoTests = function() { describe('Invalid usage', function () { it("should fail due to an invalid position", function(done) { - window.plugins.toast.show('hi', 'short', 'nowhere', fail.bind(null, done), succeed.bind(null, done)); - }); - - it("should fail due to an invalid duration", function(done) { - window.plugins.toast.show('hi', 'medium', 'top', fail.bind(null, done), succeed.bind(null, done)); + window.plugins.toast.show('hi', 'short', 'nowhere', fail.bind(null, done), succeed.bind(null, done)); }); }); };