]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Renamed test method appropriately. jslinted ElggLibTest.
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 9 Nov 2010 01:00:12 +0000 (01:00 +0000)
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 9 Nov 2010 01:00:12 +0000 (01:00 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@7267 36083f99-b078-4883-b0ff-0f9b5a30f544

js/tests/ElggLibTest.js

index 035b60325c1533876725e863a6d4378e7899a0cf..e810a47fb782870c4c525fd160a31220e5d694df 100644 (file)
@@ -15,7 +15,7 @@ ElggLibTest.prototype.testAssertTypeOf = function() {
         ['boolean', false],         \r
         ['undefined', undefined],   \r
         ['number', 0],             \r
-        ['function', function() {}],\r
+        ['function', elgg.nullFunction],\r
     ];\r
        \r
        for (var i in noexceptions) {\r
@@ -26,7 +26,7 @@ ElggLibTest.prototype.testAssertTypeOf = function() {
        \r
        var exceptions = [\r
         ['function', {}],\r
-        ['object', function() {}],\r
+        ['object', elgg.nullFunction],\r
     ];\r
        \r
        for (var i in exceptions) {\r
@@ -50,19 +50,23 @@ ElggLibTest.prototype.testProvide = function() {
        assertEquals(str, foo.bar.baz.oof);\r
 };\r
 \r
-ElggLibTest.prototype.testRequire = function() {\r
-       /* Try requiring bogus input */\r
+/**\r
+ * Try requiring bogus input \r
+ */\r
+ElggLibTest.prototype.testRequire = function () {\r
        assertException(function(){ elgg.require(''); });\r
        assertException(function(){ elgg.require('garbage'); });\r
        assertException(function(){ elgg.require('gar.ba.ge'); });\r
 \r
-       assertNoException(function(){ elgg.require('jQuery'); });\r
-       assertNoException(function(){ elgg.require('elgg'); });\r
-       assertNoException(function(){ elgg.require('elgg.config'); });\r
-       assertNoException(function(){ elgg.require('elgg.security'); });\r
+       assertNoException(function(){\r
+               elgg.require('jQuery');\r
+               elgg.require('elgg');\r
+               elgg.require('elgg.config');\r
+               elgg.require('elgg.security');\r
+       });\r
 };\r
 \r
-ElggLibTest.prototype.testInherit = function() {\r
+ElggLibTest.prototype.testInherit = function () {\r
        function Base() {}\r
        function Child() {}\r
        \r
@@ -72,7 +76,7 @@ ElggLibTest.prototype.testInherit = function() {
        assertEquals(Child, Child.prototype.constructor);\r
 };\r
 \r
-ElggLibTest.prototype.testExtendUrl = function() {\r
+ElggLibTest.prototype.testNormalizeUrl = function() {\r
        elgg.config.wwwroot = "http://elgg.org/";\r
        \r
        var inputs = [\r