From bb811116eb463705748fb0fac3ff3b7414693e48 Mon Sep 17 00:00:00 2001 From: Derek Cicerone Date: Sat, 20 Dec 2014 13:38:32 -0500 Subject: [PATCH] Fix unit tests --- selenium-webdriver/selenium-webdriver-tests.ts | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/selenium-webdriver/selenium-webdriver-tests.ts b/selenium-webdriver/selenium-webdriver-tests.ts index 467a01d3b..73ea8561e 100644 --- a/selenium-webdriver/selenium-webdriver-tests.ts +++ b/selenium-webdriver/selenium-webdriver-tests.ts @@ -777,7 +777,7 @@ function TestWebElementPromise() { elementPromise.then(); elementPromise.then(function (element: webdriver.WebElement) { }); elementPromise.then(function (element: webdriver.WebElement) { }, function (error: any) { }); - elementPromise.then(function (element: webdriver.WebElement) { }, function (error: any) { }).then(function (result: string) { }); + elementPromise.then(function (element: webdriver.WebElement) { return "foo"; }, function (error: any) { }).then(function (result: string) { }); elementPromise.thenCatch(function (error: any) { }).then(function (value: any) { }); @@ -1029,10 +1029,9 @@ function TestPromiseClass() { var isPending: boolean = promise.isPending(); promise = promise.then(); - promise = promise.then(function( a: string ) { }); promise = promise.then(function( a: string ) { return 'cde'; }); - promise = promise.then(function( a: string ) {}, function( e: any) {}); - promise = promise.then(function (a: string) { }, function (e: any) { return 123; }); + promise = promise.then(function( a: string ) { return 'cde'; }, function( e: any) {}); + promise = promise.then(function( a: string ) { return 'cde'; }, function (e: any) { return 123; }); promise = promise.thenCatch(function (error: any) { }); @@ -1047,10 +1046,9 @@ function TestThenableClass() { var isPending: boolean = thenable.isPending(); thenable = thenable.then(); - thenable = thenable.then(function (a: string) { }); thenable = thenable.then(function (a: string) { return 'cde'; }); - thenable = thenable.then(function (a: string) { }, function (e: any) { }); - thenable = thenable.then(function (a: string) { }, function (e: any) { return 123; }); + thenable = thenable.then(function (a: string) { return 'cde'; }, function (e: any) { }); + thenable = thenable.then(function (a: string) { return 'cde'; }, function (e: any) { return 123; }); thenable = thenable.thenCatch(function (error: any) { }); @@ -1158,4 +1156,4 @@ function TestTestingModule() { testing.afterEach(function () { }); -} \ No newline at end of file +}