angular.js/test
Codier 29f9e2665d fix(scope): $watch (and angular.equals) should support NaN values
- since NaN !== NaN in javascript digest can get into an infinite loop
  when model value is set to NaN
- angular.equals(NaN, NaN) should return true since that's what we
  expect when comparing primitives or objects containing NaN values

Previously NaN because of its special === properties was used as the
initial value for watches, but that results in issues when NaN is used
as model value.

In order to allow for model to be anything incuding undefined and NaN we
need to mark the initial value differently in a way that would avoid
these issues, allow us to run digest without major perf penalties and
allow for clients to determine if the listener is being called because
the watcher is being initialized or because the model changed. This
implementation covers all of these scenarios.

BREAKING CHANGE: previously to detect if the listener was called because
the watcher was being initialized, it was suggested that clients check
if old value is NaN. With this change, the check should be if the newVal
equals the oldVal.

Closes #657
2011-11-21 15:43:12 -08:00
..
jstd-scenario-adapter chore(formating): clean code to be function() { 2011-10-11 11:01:46 -07:00
scenario refactor(injector): $injector is no longer a function. 2011-11-14 20:31:19 -08:00
service fix(scope): $watch (and angular.equals) should support NaN values 2011-11-21 15:43:12 -08:00
widget fix(input): treat all not number model as blank 2011-11-15 11:47:23 -08:00
angular-mocksSpec.js style(docs): make jslint happy - fix some warnings 2011-11-14 20:31:19 -08:00
AngularSpec.js fix(scope): $watch (and angular.equals) should support NaN values 2011-11-21 15:43:12 -08:00
ApiSpecs.js refactor(api): remove type augmentation 2011-11-14 20:31:14 -08:00
BinderSpec.js refactor(mock): moved mocks into its own module 2011-11-14 20:31:14 -08:00
directivesSpec.js refactor(injector): removed loadModule/ng:module 2011-11-14 20:31:21 -08:00
InjectorSpec.js refactor(injector): $injector is no longer a function. 2011-11-14 20:31:19 -08:00
jqLiteSpec.js refactor(injector): turn scope into a service 2011-11-14 16:39:31 -08:00
jquery_alias.js fix(specs): fix jQuery to jqLite binding on IE8 2011-09-16 02:44:33 +02:00
jquery_remove.js fix(specs): fix jQuery to jqLite binding on IE8 2011-09-16 02:44:33 +02:00
jQueryPatchSpec.js chore(formating): clean code to be function() { 2011-10-11 11:01:46 -07:00
JsonSpec.js refactor(json): break dependence on api.js 2011-11-14 20:31:13 -08:00
markupSpec.js refactor(injector): $injector is no longer a function. 2011-11-14 20:31:19 -08:00
matchers.js style(docs): make jslint happy - fix some warnings 2011-11-14 20:31:19 -08:00
ResourceSpec.js refactor(mock): moved mocks into its own module 2011-11-14 20:31:14 -08:00
sanitizerSpec.js chore(formating): clean code to be function() { 2011-10-11 11:01:46 -07:00
ScenarioSpec.js refactor(compiler) turn compiler into a service 2011-11-14 16:39:32 -08:00
testabilityPatch.js refactor(injector): $injector is no longer a function. 2011-11-14 20:31:19 -08:00
widgetsSpec.js refactor(injector): $injector is no longer a function. 2011-11-14 20:31:19 -08:00