From 0985a37376314616ac2b777bddd8bc07e1be7af7 Mon Sep 17 00:00:00 2001 From: Oren Avissar Date: Mon, 22 Apr 2013 21:00:15 -0700 Subject: test(browser/compile): fix calls to Jasmine fail() The fail() function in Jasmine expects an Error object parameter. Also, there is no global alias for fail() so it must be accessed using `this.fail(new Error())`. --- test/ng/browserSpecs.js | 4 ++-- test/ng/compileSpec.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) mode change 100644 => 100755 test/ng/browserSpecs.js mode change 100644 => 100755 test/ng/compileSpec.js (limited to 'test') diff --git a/test/ng/browserSpecs.js b/test/ng/browserSpecs.js old mode 100644 new mode 100755 index e989330b..eba9bd02 --- a/test/ng/browserSpecs.js +++ b/test/ng/browserSpecs.js @@ -271,8 +271,8 @@ describe('browser', function() { browser.cookies('x', longVal + longVal + longVal); //should be too long for all browsers if (document.cookie !== cookieStr) { - fail("browser didn't drop long cookie when it was expected. make the cookie in this " + - "test longer"); + this.fail(new Error("browser didn't drop long cookie when it was expected. make the " + + "cookie in this test longer")); } expect(browser.cookies().x).toEqual('shortVal'); diff --git a/test/ng/compileSpec.js b/test/ng/compileSpec.js old mode 100644 new mode 100755 index 9614030c..26f61357 --- a/test/ng/compileSpec.js +++ b/test/ng/compileSpec.js @@ -540,8 +540,8 @@ describe('$compile', function() { it('should prevent multiple templates per element', inject(function($compile) { try { - $compile('