QUnit.test('immediately sets up dependencies if already being watched', function() { addObserver(obj, 'bar', incrementCount); defineProperty(obj, 'bar', alias('foo.faz')); ok(isWatching(obj, 'foo.faz')); set(obj, 'foo.faz', 'BAR'); equal(count, 1); });
QUnit.test('begins watching alt key as soon as alias is watched', function() { defineProperty(obj, 'bar', alias('foo.faz')); addObserver(obj, 'bar', incrementCount); ok(isWatching(obj, 'foo.faz')); set(obj, 'foo.faz', 'BAR'); equal(count, 1); });