diff options
| author | Igor Minar | 2013-08-09 00:16:27 -0700 |
|---|---|---|
| committer | Igor Minar | 2013-08-09 00:39:31 -0700 |
| commit | b3087421f20241f9bcb9b1f00ee9a30efc8b0899 (patch) | |
| tree | 73ea7d976d1f56687db196e876f41e39fcdea209 | |
| parent | 3824e40011df1c0fdf5964d78776f1a12a29c144 (diff) | |
| download | angular.js-b3087421f20241f9bcb9b1f00ee9a30efc8b0899.tar.bz2 | |
docs(jqLite): update the minErr codes for on() and off()
| -rw-r--r-- | docs/content/error/jqLite/offargs.ngdoc (renamed from docs/content/error/jqLite/off_args.ngdoc) | 4 | ||||
| -rw-r--r-- | docs/content/error/jqLite/onargs.ngdoc (renamed from docs/content/error/jqLite/on_args.ngdoc) | 2 | ||||
| -rw-r--r-- | src/jqLite.js | 4 | ||||
| -rw-r--r-- | test/jqLiteSpec.js | 8 |
4 files changed, 9 insertions, 9 deletions
diff --git a/docs/content/error/jqLite/off_args.ngdoc b/docs/content/error/jqLite/offargs.ngdoc index 04147242..44e2ca7c 100644 --- a/docs/content/error/jqLite/off_args.ngdoc +++ b/docs/content/error/jqLite/offargs.ngdoc @@ -1,7 +1,7 @@ @ngdoc error -@name jqLite:off_args +@name jqLite:offargs @fullName Invalid jqLite#off() parameter @description This error occurs when trying to pass too many arguments to `jqLite#off`. Note -that `jqLite#off` does not support namespaces or selectors like jQuery.
\ No newline at end of file +that `jqLite#off` does not support namespaces or selectors like jQuery. diff --git a/docs/content/error/jqLite/on_args.ngdoc b/docs/content/error/jqLite/onargs.ngdoc index cba1e530..34a96b3a 100644 --- a/docs/content/error/jqLite/on_args.ngdoc +++ b/docs/content/error/jqLite/onargs.ngdoc @@ -1,5 +1,5 @@ @ngdoc error -@name jqLite:on_args +@name jqLite:onargs @fullName Invalid jqLite#on() Parameters @description diff --git a/src/jqLite.js b/src/jqLite.js index 76031182..6ac99987 100644 --- a/src/jqLite.js +++ b/src/jqLite.js @@ -194,7 +194,7 @@ function JQLiteDealoc(element){ } function JQLiteOff(element, type, fn, unsupported) { - if (isDefined(unsupported)) throw jqLiteMinErr('off_args', 'jqLite#off() does not support the `selector` argument'); + if (isDefined(unsupported)) throw jqLiteMinErr('offargs', 'jqLite#off() does not support the `selector` argument'); var events = JQLiteExpandoStore(element, 'events'), handle = JQLiteExpandoStore(element, 'handle'); @@ -633,7 +633,7 @@ forEach({ dealoc: JQLiteDealoc, on: function onFn(element, type, fn, unsupported){ - if (isDefined(unsupported)) throw jqLiteMinErr('on_args', 'jqLite#on() does not support the `selector` or `eventData` parameters'); + if (isDefined(unsupported)) throw jqLiteMinErr('onargs', 'jqLite#on() does not support the `selector` or `eventData` parameters'); var events = JQLiteExpandoStore(element, 'events'), handle = JQLiteExpandoStore(element, 'handle'); diff --git a/test/jqLiteSpec.js b/test/jqLiteSpec.js index f8d71bc9..abfad064 100644 --- a/test/jqLiteSpec.js +++ b/test/jqLiteSpec.js @@ -886,15 +886,15 @@ describe('jqLite', function() { expect(function() { elm.on('click', anObj, callback); - }).toThrow(); + }).toThrowMatching(/\[jqLite\:onargs\]/); expect(function() { elm.on('click', null, aString, callback); - }).toThrow(); + }).toThrowMatching(/\[jqLite\:onargs\]/); expect(function() { elm.on('click', aValue, callback); - }).toThrow(); + }).toThrowMatching(/\[jqLite\:onargs\]/); }); } @@ -1059,7 +1059,7 @@ describe('jqLite', function() { aElem.on('click', noop); expect(function () { aElem.off('click', noop, '.test'); - }).toThrowMatching(/\[jqLite:off_args\]/); + }).toThrowMatching(/\[jqLite:offargs\]/); }); } }); |
