aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMisko Hevery2010-09-14 23:22:15 +0200
committerMisko Hevery2010-09-14 23:22:15 +0200
commit894ffadc8c35da6c7daf3e16a9f4931b24f3b231 (patch)
treeb96beb2111540f928bfcf410afae8036c312c046 /test
parente3f760fbadedc977d9f5f461feafbaecab5a9046 (diff)
downloadangular.js-894ffadc8c35da6c7daf3e16a9f4931b24f3b231.tar.bz2
Fixed all trivial jslint violations
Diffstat (limited to 'test')
-rw-r--r--test/BrowserSpecs.js2
-rw-r--r--test/scenario/DSLSpec.js24
-rw-r--r--test/scenario/RunnerSpec.js4
-rw-r--r--test/servicesSpec.js12
4 files changed, 19 insertions, 23 deletions
diff --git a/test/BrowserSpecs.js b/test/BrowserSpecs.js
index f80de417..4138a9d9 100644
--- a/test/BrowserSpecs.js
+++ b/test/BrowserSpecs.js
@@ -98,7 +98,7 @@ describe('browser', function(){
var name = eqPos > -1 ? cookie.substr(0, eqPos) : cookie;
document.cookie = name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT";
}
- };
+ }
var browser;
diff --git a/test/scenario/DSLSpec.js b/test/scenario/DSLSpec.js
index f8606641..7a8e2e3b 100644
--- a/test/scenario/DSLSpec.js
+++ b/test/scenario/DSLSpec.js
@@ -43,33 +43,29 @@ describe("DSL", function() {
describe('browser', function() {
var browser = angular.scenario.dsl.browser;
- it('shoud return true if location with empty hash provided is same '
- + 'as location of the page', function() {
+ it('shoud return true if location with empty hash provided is same ' +
+ 'as location of the page', function() {
browser.location.href = "http://server";
expect(browser.location.toEqual("http://server")).toEqual(true);
});
- it('shoud return true if location with hash provided is same '
- + 'as location of the page', function() {
+ it('shoud return true if location with hash provided is same ' +
+ 'as location of the page', function() {
browser.location.href = "http://server";
browser.location.hash = "hashPath";
- expect(browser.location.toEqual("http://server/#/hashPath"))
- .toEqual(true);
+ expect(browser.location.toEqual("http://server/#/hashPath")).toEqual(true);
});
- it('should return true if the location provided is the same as which '
- + 'browser navigated to', function() {
+ it('should return true if the location provided is the same as which ' +
+ 'browser navigated to', function() {
var future = browser.navigateTo("http://server/#/hashPath");
expect(future.name).toEqual("Navigate to: http://server/#/hashPath");
executeFuture(future, '<input type="text" name="name" />');
- expect(browser.location.toEqual("http://server/#/hashPath"))
- .toEqual(true);
- expect(browser.location.toEqual("http://server/"))
- .toEqual(false);
+ expect(browser.location.toEqual("http://server/#/hashPath")).toEqual(true);
+ expect(browser.location.toEqual("http://server/")).toEqual(false);
future = browser.navigateTo("http://server/");
expect(future.name).toEqual("Navigate to: http://server/");
executeFuture(future, '<input type="text" name="name" />');
- expect(browser.location.toEqual("http://server/"))
- .toEqual(true);
+ expect(browser.location.toEqual("http://server/")).toEqual(true);
});
});
diff --git a/test/scenario/RunnerSpec.js b/test/scenario/RunnerSpec.js
index b12c43c6..2986add6 100644
--- a/test/scenario/RunnerSpec.js
+++ b/test/scenario/RunnerSpec.js
@@ -47,7 +47,7 @@ describe('Runner', function() {
fail();
} catch (e) {
expect(e.message).toEqual('blah');
- };
+ }
});
});
@@ -116,7 +116,7 @@ describe('Runner', function() {
describe('future building', function() {
it('should queue futures', function() {
- function behavior(){};
+ function behavior(){}
Describe('name', function() {
It('should', function() {
$scenario.addFuture('futureName', behavior);
diff --git a/test/servicesSpec.js b/test/servicesSpec.js
index e1534e94..b39e401c 100644
--- a/test/servicesSpec.js
+++ b/test/servicesSpec.js
@@ -34,10 +34,10 @@ describe("service", function(){
describe("$log", function(){
it('should use console if present', function(){
var logger = "";
- function log(){ logger+= 'log;'; };
- function warn(){ logger+= 'warn;'; };
- function info(){ logger+= 'info;'; };
- function error(){ logger+= 'error;'; };
+ function log(){ logger+= 'log;'; }
+ function warn(){ logger+= 'warn;'; }
+ function info(){ logger+= 'info;'; }
+ function error(){ logger+= 'error;'; }
var scope = createScope(null, angularService, {$window: {console:{log:log, warn:warn, info:info, error:error}}, $document:[{cookie:''}]});
scope.$log.log();
scope.$log.warn();
@@ -48,7 +48,7 @@ describe("service", function(){
it('should use console.log if other not present', function(){
var logger = "";
- function log(){ logger+= 'log;'; };
+ function log(){ logger+= 'log;'; }
var scope = createScope(null, angularService, {$window: {console:{log:log}}, $document:[{cookie:''}]});
scope.$log.log();
scope.$log.warn();
@@ -462,4 +462,4 @@ describe("service", function(){
});
});
-}); \ No newline at end of file
+});