ember-source 3.0.0.beta.1 → 3.0.0.beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/dist/ember-runtime.js +34 -540
- data/dist/ember-template-compiler.js +125 -604
- data/dist/ember-testing.js +1 -1
- data/dist/ember-tests.js +91 -1280
- data/dist/ember-tests.prod.js +84 -1219
- data/dist/ember.debug.js +173 -603
- data/dist/ember.min.js +383 -393
- data/dist/ember.prod.js +177 -593
- data/package.json +12 -6
- metadata +2 -2
data/dist/ember-testing.js
CHANGED
data/dist/ember-tests.js
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
* Portions Copyright 2008-2011 Apple Inc. All rights reserved.
|
7
7
|
* @license Licensed under MIT license
|
8
8
|
* See https://raw.github.com/emberjs/ember.js/master/LICENSE
|
9
|
-
* @version 3.0.0-beta.
|
9
|
+
* @version 3.0.0-beta.2
|
10
10
|
*/
|
11
11
|
|
12
12
|
/*globals process */
|
@@ -121,12 +121,6 @@ QUnit.test('should pass ESLint', function(assert) {
|
|
121
121
|
assert.ok(true, 'alias.js should pass ESLint\n\n');
|
122
122
|
});
|
123
123
|
|
124
|
-
QUnit.module('ESLint | binding.js');
|
125
|
-
QUnit.test('should pass ESLint', function(assert) {
|
126
|
-
assert.expect(1);
|
127
|
-
assert.ok(true, 'binding.js should pass ESLint\n\n');
|
128
|
-
});
|
129
|
-
|
130
124
|
QUnit.module('ESLint | cache.js');
|
131
125
|
QUnit.test('should pass ESLint', function(assert) {
|
132
126
|
assert.expect(1);
|
@@ -9472,81 +9466,6 @@ QUnit.test('should pass ESLint', function(assert) {
|
|
9472
9466
|
assert.ok(true, 'ember-glimmer/tests/integration/application/rendering-test.js should pass ESLint\n\n');
|
9473
9467
|
});
|
9474
9468
|
|
9475
|
-
enifed('ember-glimmer/tests/integration/binding_integration_test', ['ember-babel', 'ember-glimmer/tests/utils/test-case', 'ember-glimmer/tests/utils/helpers', 'ember-metal'], function (_emberBabel, _testCase, _helpers, _emberMetal) {
|
9476
|
-
'use strict';
|
9477
|
-
|
9478
|
-
(0, _testCase.moduleFor)('Binding integration tests', function (_RenderingTest) {
|
9479
|
-
(0, _emberBabel.inherits)(_class, _RenderingTest);
|
9480
|
-
|
9481
|
-
function _class() {
|
9482
|
-
(0, _emberBabel.classCallCheck)(this, _class);
|
9483
|
-
return (0, _emberBabel.possibleConstructorReturn)(this, _RenderingTest.apply(this, arguments));
|
9484
|
-
}
|
9485
|
-
|
9486
|
-
_class.prototype['@test should accept bindings as a string or an Ember.binding'] = function testShouldAcceptBindingsAsAStringOrAnEmberBinding() {
|
9487
|
-
var _this2 = this;
|
9488
|
-
|
9489
|
-
var FooBarComponent = _helpers.Component.extend({
|
9490
|
-
twoWayTestBinding: _emberMetal.Binding.from('direction'),
|
9491
|
-
stringTestBinding: 'direction',
|
9492
|
-
twoWayObjectTestBinding: _emberMetal.Binding.from('displacement.distance'),
|
9493
|
-
stringObjectTestBinding: 'displacement.distance'
|
9494
|
-
});
|
9495
|
-
|
9496
|
-
this.registerComponent('foo-bar', {
|
9497
|
-
ComponentClass: FooBarComponent,
|
9498
|
-
template: 'two way: {{twoWayTest}}, string: {{stringTest}}, object: {{twoWayObjectTest}}, string object: {{stringObjectTest}}'
|
9499
|
-
});
|
9500
|
-
|
9501
|
-
expectDeprecation(function () {
|
9502
|
-
_this2.render('{{foo-bar direction=direction displacement=displacement}}', {
|
9503
|
-
direction: 'down',
|
9504
|
-
displacement: {
|
9505
|
-
distance: 10
|
9506
|
-
}
|
9507
|
-
});
|
9508
|
-
}, /`Ember\.Binding` is deprecated/);
|
9509
|
-
|
9510
|
-
this.assertText('two way: down, string: down, object: 10, string object: 10');
|
9511
|
-
|
9512
|
-
this.assertStableRerender();
|
9513
|
-
|
9514
|
-
this.runTask(function () {
|
9515
|
-
return (0, _emberMetal.set)(_this2.context, 'direction', 'up');
|
9516
|
-
});
|
9517
|
-
|
9518
|
-
this.assertText('two way: up, string: up, object: 10, string object: 10');
|
9519
|
-
|
9520
|
-
this.runTask(function () {
|
9521
|
-
return (0, _emberMetal.set)(_this2.context, 'displacement.distance', 20);
|
9522
|
-
});
|
9523
|
-
|
9524
|
-
this.assertText('two way: up, string: up, object: 20, string object: 20');
|
9525
|
-
|
9526
|
-
this.runTask(function () {
|
9527
|
-
(0, _emberMetal.set)(_this2.context, 'direction', 'right');
|
9528
|
-
(0, _emberMetal.set)(_this2.context, 'displacement.distance', 30);
|
9529
|
-
});
|
9530
|
-
|
9531
|
-
this.assertText('two way: right, string: right, object: 30, string object: 30');
|
9532
|
-
|
9533
|
-
this.runTask(function () {
|
9534
|
-
(0, _emberMetal.set)(_this2.context, 'direction', 'down');
|
9535
|
-
(0, _emberMetal.set)(_this2.context, 'displacement', { distance: 10 });
|
9536
|
-
});
|
9537
|
-
|
9538
|
-
this.assertText('two way: down, string: down, object: 10, string object: 10');
|
9539
|
-
};
|
9540
|
-
|
9541
|
-
return _class;
|
9542
|
-
}(_testCase.RenderingTest));
|
9543
|
-
});
|
9544
|
-
QUnit.module('ESLint | ember-glimmer/tests/integration/binding_integration_test.js');
|
9545
|
-
QUnit.test('should pass ESLint', function(assert) {
|
9546
|
-
assert.expect(1);
|
9547
|
-
assert.ok(true, 'ember-glimmer/tests/integration/binding_integration_test.js should pass ESLint\n\n');
|
9548
|
-
});
|
9549
|
-
|
9550
9469
|
enifed('ember-glimmer/tests/integration/components/append-test', ['ember-babel', 'ember-metal', 'ember-views', 'ember-glimmer/tests/utils/test-case', 'ember-glimmer/tests/utils/helpers', 'ember-glimmer/tests/utils/abstract-test-case'], function (_emberBabel, _emberMetal, _emberViews, _testCase, _helpers, _abstractTestCase) {
|
9551
9470
|
'use strict';
|
9552
9471
|
|
@@ -33783,6 +33702,95 @@ QUnit.test('should pass ESLint', function(assert) {
|
|
33783
33702
|
assert.ok(true, 'ember-glimmer/tests/integration/refinements-test.js should pass ESLint\n\n');
|
33784
33703
|
});
|
33785
33704
|
|
33705
|
+
enifed('ember-glimmer/tests/integration/render-settled-test', ['ember-babel', 'internal-test-helpers', 'ember-glimmer', 'rsvp', 'ember-metal'], function (_emberBabel, _internalTestHelpers, _emberGlimmer, _rsvp, _emberMetal) {
|
33706
|
+
'use strict';
|
33707
|
+
|
33708
|
+
var _templateObject = (0, _emberBabel.taggedTemplateLiteralLoose)(['{{foo}}'], ['{{foo}}']);
|
33709
|
+
|
33710
|
+
(0, _internalTestHelpers.moduleFor)('renderSettled', function (_RenderingTestCase) {
|
33711
|
+
(0, _emberBabel.inherits)(_class, _RenderingTestCase);
|
33712
|
+
|
33713
|
+
function _class() {
|
33714
|
+
(0, _emberBabel.classCallCheck)(this, _class);
|
33715
|
+
return (0, _emberBabel.possibleConstructorReturn)(this, _RenderingTestCase.apply(this, arguments));
|
33716
|
+
}
|
33717
|
+
|
33718
|
+
_class.prototype['@test resolves when no rendering is happening'] = function testResolvesWhenNoRenderingIsHappening(assert) {
|
33719
|
+
return (0, _emberGlimmer.renderSettled)().then(function () {
|
33720
|
+
assert.ok(true, 'resolved even without rendering');
|
33721
|
+
});
|
33722
|
+
};
|
33723
|
+
|
33724
|
+
_class.prototype['@test resolves renderers exist but no runloops are triggered'] = function testResolvesRenderersExistButNoRunloopsAreTriggered(assert) {
|
33725
|
+
this.render((0, _internalTestHelpers.strip)(_templateObject), { foo: 'bar' });
|
33726
|
+
|
33727
|
+
return (0, _emberGlimmer.renderSettled)().then(function () {
|
33728
|
+
assert.ok(true, 'resolved even without runloops');
|
33729
|
+
});
|
33730
|
+
};
|
33731
|
+
|
33732
|
+
_class.prototype['@test does not create extraneous promises'] = function testDoesNotCreateExtraneousPromises(assert) {
|
33733
|
+
var first = (0, _emberGlimmer.renderSettled)();
|
33734
|
+
var second = (0, _emberGlimmer.renderSettled)();
|
33735
|
+
|
33736
|
+
assert.strictEqual(first, second);
|
33737
|
+
|
33738
|
+
return (0, _rsvp.all)([first, second]);
|
33739
|
+
};
|
33740
|
+
|
33741
|
+
_class.prototype['@test resolves when rendering has completed (after property update)'] = function testResolvesWhenRenderingHasCompletedAfterPropertyUpdate() {
|
33742
|
+
var _this2 = this;
|
33743
|
+
|
33744
|
+
this.render((0, _internalTestHelpers.strip)(_templateObject), { foo: 'bar' });
|
33745
|
+
|
33746
|
+
this.assertText('bar');
|
33747
|
+
this.component.set('foo', 'baz');
|
33748
|
+
this.assertText('bar');
|
33749
|
+
|
33750
|
+
return (0, _emberGlimmer.renderSettled)().then(function () {
|
33751
|
+
_this2.assertText('baz');
|
33752
|
+
});
|
33753
|
+
};
|
33754
|
+
|
33755
|
+
_class.prototype['@test resolves in run loop when renderer has settled'] = function testResolvesInRunLoopWhenRendererHasSettled(assert) {
|
33756
|
+
var _this3 = this;
|
33757
|
+
|
33758
|
+
assert.expect(3);
|
33759
|
+
|
33760
|
+
this.render((0, _internalTestHelpers.strip)(_templateObject), { foo: 'bar' });
|
33761
|
+
|
33762
|
+
this.assertText('bar');
|
33763
|
+
var promise = void 0;
|
33764
|
+
|
33765
|
+
return (0, _emberMetal.run)(function () {
|
33766
|
+
_emberMetal.run.schedule('actions', null, function () {
|
33767
|
+
_this3.component.set('foo', 'set in actions');
|
33768
|
+
|
33769
|
+
promise = (0, _emberGlimmer.renderSettled)().then(function () {
|
33770
|
+
_this3.assertText('set in afterRender');
|
33771
|
+
});
|
33772
|
+
|
33773
|
+
_emberMetal.run.schedule('afterRender', null, function () {
|
33774
|
+
_this3.component.set('foo', 'set in afterRender');
|
33775
|
+
});
|
33776
|
+
});
|
33777
|
+
|
33778
|
+
// still not updated here
|
33779
|
+
_this3.assertText('bar');
|
33780
|
+
|
33781
|
+
return promise;
|
33782
|
+
});
|
33783
|
+
};
|
33784
|
+
|
33785
|
+
return _class;
|
33786
|
+
}(_internalTestHelpers.RenderingTestCase));
|
33787
|
+
});
|
33788
|
+
QUnit.module('ESLint | ember-glimmer/tests/integration/render-settled-test.js');
|
33789
|
+
QUnit.test('should pass ESLint', function(assert) {
|
33790
|
+
assert.expect(1);
|
33791
|
+
assert.ok(true, 'ember-glimmer/tests/integration/render-settled-test.js should pass ESLint\n\n');
|
33792
|
+
});
|
33793
|
+
|
33786
33794
|
enifed('ember-glimmer/tests/integration/svg-test', ['ember-babel', 'ember-glimmer/tests/utils/test-case', 'ember-metal', 'ember-glimmer/tests/utils/abstract-test-case'], function (_emberBabel, _testCase, _emberMetal, _abstractTestCase) {
|
33787
33795
|
'use strict';
|
33788
33796
|
|
@@ -38364,12 +38372,6 @@ QUnit.test('should pass ESLint', function(assert) {
|
|
38364
38372
|
assert.ok(true, 'ember-metal/lib/alias.js should pass ESLint\n\n');
|
38365
38373
|
});
|
38366
38374
|
|
38367
|
-
QUnit.module('ESLint | ember-metal/lib/binding.js');
|
38368
|
-
QUnit.test('should pass ESLint', function(assert) {
|
38369
|
-
assert.expect(1);
|
38370
|
-
assert.ok(true, 'ember-metal/lib/binding.js should pass ESLint\n\n');
|
38371
|
-
});
|
38372
|
-
|
38373
38375
|
QUnit.module('ESLint | ember-metal/lib/cache.js');
|
38374
38376
|
QUnit.test('should pass ESLint', function(assert) {
|
38375
38377
|
assert.expect(1);
|
@@ -39799,327 +39801,6 @@ QUnit.test('should pass ESLint', function(assert) {
|
|
39799
39801
|
assert.ok(true, 'ember-metal/tests/alias_test.js should pass ESLint\n\n');
|
39800
39802
|
});
|
39801
39803
|
|
39802
|
-
enifed('ember-metal/tests/binding/connect_test', ['ember-environment', 'internal-test-helpers', 'ember-metal'], function (_emberEnvironment, _internalTestHelpers, _emberMetal) {
|
39803
|
-
'use strict';
|
39804
|
-
|
39805
|
-
function performTest(binding, a, b, get, set, connect) {
|
39806
|
-
if (connect === undefined) {
|
39807
|
-
connect = function () {
|
39808
|
-
return binding.connect(a);
|
39809
|
-
};
|
39810
|
-
}
|
39811
|
-
|
39812
|
-
ok(!_emberMetal.run.currentRunLoop, 'performTest should not have a currentRunLoop');
|
39813
|
-
|
39814
|
-
equal(get(a, 'foo'), 'FOO', 'a should not have changed');
|
39815
|
-
equal(get(b, 'bar'), 'BAR', 'b should not have changed');
|
39816
|
-
|
39817
|
-
connect();
|
39818
|
-
|
39819
|
-
equal(get(a, 'foo'), 'BAR', 'a should have changed');
|
39820
|
-
equal(get(b, 'bar'), 'BAR', 'b should have changed');
|
39821
|
-
//
|
39822
|
-
// make sure changes sync both ways
|
39823
|
-
(0, _emberMetal.run)(function () {
|
39824
|
-
return set(b, 'bar', 'BAZZ');
|
39825
|
-
});
|
39826
|
-
equal(get(a, 'foo'), 'BAZZ', 'a should have changed');
|
39827
|
-
|
39828
|
-
(0, _emberMetal.run)(function () {
|
39829
|
-
return set(a, 'foo', 'BARF');
|
39830
|
-
});
|
39831
|
-
equal(get(b, 'bar'), 'BARF', 'a should have changed');
|
39832
|
-
}
|
39833
|
-
|
39834
|
-
var originalLookup = void 0,
|
39835
|
-
lookup = void 0,
|
39836
|
-
GlobalB = void 0;
|
39837
|
-
|
39838
|
-
QUnit.module('Ember.Binding', {
|
39839
|
-
setup: function () {
|
39840
|
-
originalLookup = _emberEnvironment.context.lookup;
|
39841
|
-
_emberEnvironment.context.lookup = lookup = {};
|
39842
|
-
},
|
39843
|
-
teardown: function () {
|
39844
|
-
lookup = null;
|
39845
|
-
_emberEnvironment.context.lookup = originalLookup;
|
39846
|
-
}
|
39847
|
-
});
|
39848
|
-
|
39849
|
-
(0, _internalTestHelpers.testBoth)('Connecting a binding between two properties', function (get, set) {
|
39850
|
-
var a = { foo: 'FOO', bar: 'BAR' };
|
39851
|
-
|
39852
|
-
// a.bar -> a.foo
|
39853
|
-
var binding = new _emberMetal.Binding('foo', 'bar');
|
39854
|
-
|
39855
|
-
expectDeprecation(function () {
|
39856
|
-
performTest(binding, a, a, get, set);
|
39857
|
-
}, /`Ember\.Binding` is deprecated./);
|
39858
|
-
});
|
39859
|
-
|
39860
|
-
(0, _internalTestHelpers.testBoth)('Connecting a oneWay binding raises a deprecation', function () {
|
39861
|
-
var a = { foo: 'FOO', bar: 'BAR', toString: function () {
|
39862
|
-
return '<custom object ID here>';
|
39863
|
-
}
|
39864
|
-
};
|
39865
|
-
|
39866
|
-
// a.bar -> a.foo
|
39867
|
-
var binding = new _emberMetal.Binding('foo', 'bar').oneWay();
|
39868
|
-
|
39869
|
-
expectDeprecation(function () {
|
39870
|
-
binding.connect(a);
|
39871
|
-
}, /`Ember.Binding` is deprecated/);
|
39872
|
-
});
|
39873
|
-
|
39874
|
-
(0, _internalTestHelpers.testBoth)('Connecting a binding between two objects', function (get, set) {
|
39875
|
-
var b = { bar: 'BAR' };
|
39876
|
-
var a = { foo: 'FOO', b: b };
|
39877
|
-
|
39878
|
-
// b.bar -> a.foo
|
39879
|
-
var binding = new _emberMetal.Binding('foo', 'b.bar');
|
39880
|
-
|
39881
|
-
expectDeprecation(function () {
|
39882
|
-
performTest(binding, a, b, get, set);
|
39883
|
-
}, /`Ember\.Binding` is deprecated./);
|
39884
|
-
});
|
39885
|
-
|
39886
|
-
(0, _internalTestHelpers.testBoth)('Connecting a binding to path', function (get, set) {
|
39887
|
-
var a = { foo: 'FOO' };
|
39888
|
-
lookup['GlobalB'] = GlobalB = {
|
39889
|
-
b: { bar: 'BAR' }
|
39890
|
-
};
|
39891
|
-
|
39892
|
-
var b = get(GlobalB, 'b');
|
39893
|
-
|
39894
|
-
// globalB.b.bar -> a.foo
|
39895
|
-
var binding = new _emberMetal.Binding('foo', 'GlobalB.b.bar');
|
39896
|
-
|
39897
|
-
expectDeprecation(function () {
|
39898
|
-
performTest(binding, a, b, get, set);
|
39899
|
-
}, /`Ember\.Binding` is deprecated./);
|
39900
|
-
|
39901
|
-
// make sure modifications update
|
39902
|
-
b = { bar: 'BIFF' };
|
39903
|
-
|
39904
|
-
(0, _emberMetal.run)(function () {
|
39905
|
-
return set(GlobalB, 'b', b);
|
39906
|
-
});
|
39907
|
-
|
39908
|
-
equal(get(a, 'foo'), 'BIFF', 'a should have changed');
|
39909
|
-
});
|
39910
|
-
|
39911
|
-
(0, _internalTestHelpers.testBoth)('Calling connect more than once', function (get, set) {
|
39912
|
-
var b = { bar: 'BAR' };
|
39913
|
-
var a = { foo: 'FOO', b: b };
|
39914
|
-
|
39915
|
-
// b.bar -> a.foo
|
39916
|
-
var binding = new _emberMetal.Binding('foo', 'b.bar');
|
39917
|
-
|
39918
|
-
expectDeprecation(function () {
|
39919
|
-
performTest(binding, a, b, get, set, function () {
|
39920
|
-
binding.connect(a);
|
39921
|
-
binding.connect(a);
|
39922
|
-
});
|
39923
|
-
}, /`Ember\.Binding` is deprecated./);
|
39924
|
-
});
|
39925
|
-
|
39926
|
-
QUnit.test('inherited bindings should sync on create', function () {
|
39927
|
-
var a = void 0;
|
39928
|
-
(0, _emberMetal.run)(function () {
|
39929
|
-
function A() {
|
39930
|
-
(0, _emberMetal.bind)(this, 'foo', 'bar.baz');
|
39931
|
-
}
|
39932
|
-
|
39933
|
-
expectDeprecation(function () {
|
39934
|
-
return a = new A();
|
39935
|
-
}, /`Ember\.Binding` is deprecated/);
|
39936
|
-
|
39937
|
-
(0, _emberMetal.set)(a, 'bar', { baz: 'BAZ' });
|
39938
|
-
});
|
39939
|
-
|
39940
|
-
equal((0, _emberMetal.get)(a, 'foo'), 'BAZ', 'should have synced binding on new obj');
|
39941
|
-
});
|
39942
|
-
});
|
39943
|
-
QUnit.module('ESLint | ember-metal/tests/binding/connect_test.js');
|
39944
|
-
QUnit.test('should pass ESLint', function(assert) {
|
39945
|
-
assert.expect(1);
|
39946
|
-
assert.ok(true, 'ember-metal/tests/binding/connect_test.js should pass ESLint\n\n');
|
39947
|
-
});
|
39948
|
-
|
39949
|
-
enifed('ember-metal/tests/binding/sync_test', ['internal-test-helpers', 'ember-metal'], function (_internalTestHelpers, _emberMetal) {
|
39950
|
-
'use strict';
|
39951
|
-
|
39952
|
-
QUnit.module('system/binding/sync_test.js');
|
39953
|
-
|
39954
|
-
(0, _internalTestHelpers.testBoth)('bindings should not sync twice in a single run loop', function (get, set) {
|
39955
|
-
var a = void 0,
|
39956
|
-
b = void 0,
|
39957
|
-
setValue = void 0;
|
39958
|
-
var setCalled = 0;
|
39959
|
-
var getCalled = 0;
|
39960
|
-
|
39961
|
-
(0, _emberMetal.run)(function () {
|
39962
|
-
a = {};
|
39963
|
-
|
39964
|
-
(0, _emberMetal.defineProperty)(a, 'foo', (0, _emberMetal.computed)({
|
39965
|
-
get: function () {
|
39966
|
-
getCalled++;
|
39967
|
-
return setValue;
|
39968
|
-
},
|
39969
|
-
set: function (key, value) {
|
39970
|
-
setCalled++;
|
39971
|
-
(0, _emberMetal.propertyWillChange)(this, key);
|
39972
|
-
setValue = value;
|
39973
|
-
(0, _emberMetal.propertyDidChange)(this, key);
|
39974
|
-
return value;
|
39975
|
-
}
|
39976
|
-
}).volatile());
|
39977
|
-
|
39978
|
-
b = {
|
39979
|
-
a: a
|
39980
|
-
};
|
39981
|
-
|
39982
|
-
expectDeprecation(function () {
|
39983
|
-
return (0, _emberMetal.bind)(b, 'foo', 'a.foo');
|
39984
|
-
}, /`Ember.Binding` is deprecated/);
|
39985
|
-
});
|
39986
|
-
|
39987
|
-
// reset after initial binding synchronization
|
39988
|
-
getCalled = 0;
|
39989
|
-
|
39990
|
-
(0, _emberMetal.run)(function () {
|
39991
|
-
set(a, 'foo', 'trollface');
|
39992
|
-
});
|
39993
|
-
|
39994
|
-
equal(get(b, 'foo'), 'trollface', 'the binding should sync');
|
39995
|
-
equal(setCalled, 1, 'Set should only be called once');
|
39996
|
-
equal(getCalled, 1, 'Get should only be called once');
|
39997
|
-
});
|
39998
|
-
|
39999
|
-
(0, _internalTestHelpers.testBoth)('bindings should not infinite loop if computed properties return objects', function (get) {
|
40000
|
-
var a = void 0,
|
40001
|
-
b = void 0;
|
40002
|
-
var getCalled = 0;
|
40003
|
-
|
40004
|
-
(0, _emberMetal.run)(function () {
|
40005
|
-
a = {};
|
40006
|
-
|
40007
|
-
(0, _emberMetal.defineProperty)(a, 'foo', (0, _emberMetal.computed)(function () {
|
40008
|
-
getCalled++;
|
40009
|
-
if (getCalled > 1000) {
|
40010
|
-
throw 'infinite loop detected';
|
40011
|
-
}
|
40012
|
-
return ['foo', 'bar'];
|
40013
|
-
}));
|
40014
|
-
|
40015
|
-
b = {
|
40016
|
-
a: a
|
40017
|
-
};
|
40018
|
-
|
40019
|
-
expectDeprecation(function () {
|
40020
|
-
return (0, _emberMetal.bind)(b, 'foo', 'a.foo');
|
40021
|
-
}, /`Ember.Binding` is deprecated/);
|
40022
|
-
});
|
40023
|
-
|
40024
|
-
deepEqual(get(b, 'foo'), ['foo', 'bar'], 'the binding should sync');
|
40025
|
-
equal(getCalled, 1, 'Get should only be called once');
|
40026
|
-
});
|
40027
|
-
|
40028
|
-
(0, _internalTestHelpers.testBoth)('bindings should do the right thing when observers trigger bindings in the opposite direction', function (get, set) {
|
40029
|
-
var a = void 0,
|
40030
|
-
b = void 0,
|
40031
|
-
c = void 0;
|
40032
|
-
|
40033
|
-
(0, _emberMetal.run)(function () {
|
40034
|
-
a = {
|
40035
|
-
foo: 'trololol'
|
40036
|
-
};
|
40037
|
-
|
40038
|
-
b = {
|
40039
|
-
a: a
|
40040
|
-
};
|
40041
|
-
|
40042
|
-
var deprecationMessage = /`Ember.Binding` is deprecated/;
|
40043
|
-
|
40044
|
-
expectDeprecation(function () {
|
40045
|
-
return (0, _emberMetal.bind)(b, 'foo', 'a.foo');
|
40046
|
-
}, deprecationMessage);
|
40047
|
-
|
40048
|
-
c = {
|
40049
|
-
a: a
|
40050
|
-
};
|
40051
|
-
|
40052
|
-
expectDeprecation(function () {
|
40053
|
-
(0, _emberMetal.bind)(c, 'foo', 'a.foo');
|
40054
|
-
}, deprecationMessage);
|
40055
|
-
});
|
40056
|
-
|
40057
|
-
(0, _emberMetal.addObserver)(b, 'foo', function () {
|
40058
|
-
return set(c, 'foo', 'what is going on');
|
40059
|
-
});
|
40060
|
-
|
40061
|
-
(0, _emberMetal.run)(function () {
|
40062
|
-
return set(a, 'foo', 'trollface');
|
40063
|
-
});
|
40064
|
-
|
40065
|
-
equal(get(a, 'foo'), 'what is going on');
|
40066
|
-
});
|
40067
|
-
|
40068
|
-
(0, _internalTestHelpers.testBoth)('bindings should not try to sync destroyed objects', function (get, set) {
|
40069
|
-
var a = void 0,
|
40070
|
-
b = void 0;
|
40071
|
-
|
40072
|
-
(0, _emberMetal.run)(function () {
|
40073
|
-
a = {
|
40074
|
-
foo: 'trololol'
|
40075
|
-
};
|
40076
|
-
|
40077
|
-
b = {
|
40078
|
-
a: a
|
40079
|
-
};
|
40080
|
-
|
40081
|
-
var deprecationMessage = /`Ember.Binding` is deprecated/;
|
40082
|
-
|
40083
|
-
expectDeprecation(function () {
|
40084
|
-
return (0, _emberMetal.bind)(b, 'foo', 'a.foo');
|
40085
|
-
}, deprecationMessage);
|
40086
|
-
});
|
40087
|
-
|
40088
|
-
(0, _emberMetal.run)(function () {
|
40089
|
-
set(a, 'foo', 'trollface');
|
40090
|
-
set(b, 'isDestroyed', true);
|
40091
|
-
ok(true, 'should not raise');
|
40092
|
-
});
|
40093
|
-
|
40094
|
-
(0, _emberMetal.run)(function () {
|
40095
|
-
a = {
|
40096
|
-
foo: 'trololol'
|
40097
|
-
};
|
40098
|
-
|
40099
|
-
b = {
|
40100
|
-
a: a
|
40101
|
-
};
|
40102
|
-
|
40103
|
-
var deprecationMessage = /`Ember.Binding` is deprecated/;
|
40104
|
-
|
40105
|
-
expectDeprecation(function () {
|
40106
|
-
return (0, _emberMetal.bind)(b, 'foo', 'a.foo');
|
40107
|
-
}, deprecationMessage);
|
40108
|
-
});
|
40109
|
-
|
40110
|
-
(0, _emberMetal.run)(function () {
|
40111
|
-
set(b, 'foo', 'trollface');
|
40112
|
-
set(a, 'isDestroyed', true);
|
40113
|
-
ok(true, 'should not raise');
|
40114
|
-
});
|
40115
|
-
});
|
40116
|
-
});
|
40117
|
-
QUnit.module('ESLint | ember-metal/tests/binding/sync_test.js');
|
40118
|
-
QUnit.test('should pass ESLint', function(assert) {
|
40119
|
-
assert.expect(1);
|
40120
|
-
assert.ok(true, 'ember-metal/tests/binding/sync_test.js should pass ESLint\n\n');
|
40121
|
-
});
|
40122
|
-
|
40123
39804
|
enifed('ember-metal/tests/cache_test', ['ember-metal'], function (_emberMetal) {
|
40124
39805
|
'use strict';
|
40125
39806
|
|
@@ -52580,62 +52261,6 @@ QUnit.test('should pass ESLint', function(assert) {
|
|
52580
52261
|
assert.ok(true, 'ember-runtime/tests/ext/function_test.js should pass ESLint\n\n');
|
52581
52262
|
});
|
52582
52263
|
|
52583
|
-
enifed('ember-runtime/tests/ext/mixin_test', ['ember-metal'], function (_emberMetal) {
|
52584
|
-
'use strict';
|
52585
|
-
|
52586
|
-
QUnit.module('system/mixin/binding_test');
|
52587
|
-
|
52588
|
-
QUnit.test('Defining a property ending in Binding should setup binding when applied', function () {
|
52589
|
-
var MyMixin = _emberMetal.Mixin.create({
|
52590
|
-
fooBinding: 'bar.baz'
|
52591
|
-
});
|
52592
|
-
|
52593
|
-
var obj = { bar: { baz: 'BIFF' } };
|
52594
|
-
|
52595
|
-
(0, _emberMetal.run)(function () {
|
52596
|
-
var deprecationMessage = /`Ember.Binding` is deprecated/;
|
52597
|
-
|
52598
|
-
expectDeprecation(function () {
|
52599
|
-
MyMixin.apply(obj);
|
52600
|
-
}, deprecationMessage);
|
52601
|
-
});
|
52602
|
-
|
52603
|
-
ok((0, _emberMetal.get)(obj, 'fooBinding') instanceof _emberMetal.Binding, 'should be a binding object');
|
52604
|
-
equal((0, _emberMetal.get)(obj, 'foo'), 'BIFF', 'binding should be created and synced');
|
52605
|
-
});
|
52606
|
-
|
52607
|
-
QUnit.test('Defining a property ending in Binding should apply to prototype children', function () {
|
52608
|
-
var MyMixin = (0, _emberMetal.run)(function () {
|
52609
|
-
return _emberMetal.Mixin.create({
|
52610
|
-
fooBinding: 'bar.baz'
|
52611
|
-
});
|
52612
|
-
});
|
52613
|
-
|
52614
|
-
var obj = { bar: { baz: 'BIFF' } };
|
52615
|
-
|
52616
|
-
(0, _emberMetal.run)(function () {
|
52617
|
-
var deprecationMessage = /`Ember.Binding` is deprecated/;
|
52618
|
-
|
52619
|
-
expectDeprecation(function () {
|
52620
|
-
MyMixin.apply(obj);
|
52621
|
-
}, deprecationMessage);
|
52622
|
-
});
|
52623
|
-
|
52624
|
-
var obj2 = Object.create(obj);
|
52625
|
-
(0, _emberMetal.run)(function () {
|
52626
|
-
return (0, _emberMetal.set)((0, _emberMetal.get)(obj2, 'bar'), 'baz', 'BARG');
|
52627
|
-
});
|
52628
|
-
|
52629
|
-
ok((0, _emberMetal.get)(obj2, 'fooBinding') instanceof _emberMetal.Binding, 'should be a binding object');
|
52630
|
-
equal((0, _emberMetal.get)(obj2, 'foo'), 'BARG', 'binding should be created and synced');
|
52631
|
-
});
|
52632
|
-
});
|
52633
|
-
QUnit.module('ESLint | ember-runtime/tests/ext/mixin_test.js');
|
52634
|
-
QUnit.test('should pass ESLint', function(assert) {
|
52635
|
-
assert.expect(1);
|
52636
|
-
assert.ok(true, 'ember-runtime/tests/ext/mixin_test.js should pass ESLint\n\n');
|
52637
|
-
});
|
52638
|
-
|
52639
52264
|
enifed('ember-runtime/tests/ext/rsvp_test', ['ember-metal', 'ember-runtime/ext/rsvp', 'ember-debug'], function (_emberMetal, _rsvp, _emberDebug) {
|
52640
52265
|
'use strict';
|
52641
52266
|
|
@@ -53048,7 +52673,6 @@ enifed('ember-runtime/tests/legacy_1x/mixins/observable/observable_test', ['embe
|
|
53048
52673
|
rule on using capital letters for property paths.
|
53049
52674
|
* Removed test passing context to addObserver. context param is no longer
|
53050
52675
|
supported.
|
53051
|
-
* Changed calls to Ember.Binding.flushPendingChanges() -> run.sync()
|
53052
52676
|
* removed test in observer around line 862 that expected key/value to be
|
53053
52677
|
the last item in the chained path. Should be root and chained path
|
53054
52678
|
|
@@ -53541,45 +53165,6 @@ enifed('ember-runtime/tests/legacy_1x/mixins/observable/observable_test', ['embe
|
|
53541
53165
|
equal(depObj.get('menuPrice'), 6, 'cache is properly invalidated after nested property changes');
|
53542
53166
|
});
|
53543
53167
|
|
53544
|
-
QUnit.test('nested dependent keys should propagate after they update', function () {
|
53545
|
-
var bindObj;
|
53546
|
-
(0, _emberMetal.run)(function () {
|
53547
|
-
lookup.DepObj = ObservableObject.extend({
|
53548
|
-
price: (0, _emberMetal.computed)(function () {
|
53549
|
-
return this.get('restaurant.menu.price');
|
53550
|
-
}).property('restaurant.menu.price')
|
53551
|
-
}).create({
|
53552
|
-
restaurant: ObservableObject.create({
|
53553
|
-
menu: ObservableObject.create({
|
53554
|
-
price: 5
|
53555
|
-
})
|
53556
|
-
})
|
53557
|
-
});
|
53558
|
-
|
53559
|
-
expectDeprecation(function () {
|
53560
|
-
bindObj = ObservableObject.extend({
|
53561
|
-
priceBinding: 'DepObj.price'
|
53562
|
-
}).create();
|
53563
|
-
}, /`Ember.Binding` is deprecated/);
|
53564
|
-
});
|
53565
|
-
|
53566
|
-
equal(bindObj.get('price'), 5, 'precond - binding propagates');
|
53567
|
-
|
53568
|
-
(0, _emberMetal.run)(function () {
|
53569
|
-
lookup.DepObj.set('restaurant.menu.price', 10);
|
53570
|
-
});
|
53571
|
-
|
53572
|
-
equal(bindObj.get('price'), 10, 'binding propagates after a nested dependent keys updates');
|
53573
|
-
|
53574
|
-
(0, _emberMetal.run)(function () {
|
53575
|
-
lookup.DepObj.set('restaurant.menu', ObservableObject.create({
|
53576
|
-
price: 15
|
53577
|
-
}));
|
53578
|
-
});
|
53579
|
-
|
53580
|
-
equal(bindObj.get('price'), 15, 'binding propagates after a middle dependent keys updates');
|
53581
|
-
});
|
53582
|
-
|
53583
53168
|
QUnit.test('cacheable nested dependent keys should clear after their dependencies update', function () {
|
53584
53169
|
ok(true);
|
53585
53170
|
|
@@ -53855,73 +53440,6 @@ enifed('ember-runtime/tests/legacy_1x/mixins/observable/observable_test', ['embe
|
|
53855
53440
|
}
|
53856
53441
|
equal(encounteredError, false);
|
53857
53442
|
});
|
53858
|
-
|
53859
|
-
QUnit.module('Bind function', {
|
53860
|
-
setup: function () {
|
53861
|
-
objectA = ObservableObject.create({
|
53862
|
-
name: 'Sproutcore',
|
53863
|
-
location: 'Timbaktu'
|
53864
|
-
});
|
53865
|
-
|
53866
|
-
objectB = ObservableObject.create({
|
53867
|
-
normal: 'value',
|
53868
|
-
computed: function () {
|
53869
|
-
this.normal = 'newValue';
|
53870
|
-
}
|
53871
|
-
});
|
53872
|
-
|
53873
|
-
lookup = _emberEnvironment.context.lookup = {
|
53874
|
-
'Namespace': {
|
53875
|
-
objectA: objectA,
|
53876
|
-
objectB: objectB
|
53877
|
-
}
|
53878
|
-
};
|
53879
|
-
},
|
53880
|
-
teardown: function () {
|
53881
|
-
_emberEnvironment.context.lookup = originalLookup;
|
53882
|
-
}
|
53883
|
-
});
|
53884
|
-
|
53885
|
-
QUnit.test('should bind property with method parameter as undefined', function () {
|
53886
|
-
// creating binding
|
53887
|
-
(0, _emberMetal.run)(function () {
|
53888
|
-
expectDeprecation(function () {
|
53889
|
-
objectA.bind('name', 'Namespace.objectB.normal', undefined);
|
53890
|
-
}, /`Ember.Binding` is deprecated/);
|
53891
|
-
});
|
53892
|
-
|
53893
|
-
// now make a change to see if the binding triggers.
|
53894
|
-
(0, _emberMetal.run)(function () {
|
53895
|
-
objectB.set('normal', 'changedValue');
|
53896
|
-
});
|
53897
|
-
|
53898
|
-
// support new-style bindings if available
|
53899
|
-
equal('changedValue', objectA.get('name'), 'objectA.name is bound');
|
53900
|
-
});
|
53901
|
-
|
53902
|
-
// ..........................................................
|
53903
|
-
// SPECIAL CASES
|
53904
|
-
//
|
53905
|
-
|
53906
|
-
QUnit.test('changing chained observer object to null should not raise exception', function () {
|
53907
|
-
var obj = ObservableObject.create({
|
53908
|
-
foo: ObservableObject.create({
|
53909
|
-
bar: ObservableObject.create({ bat: 'BAT' })
|
53910
|
-
})
|
53911
|
-
});
|
53912
|
-
|
53913
|
-
var callCount = 0;
|
53914
|
-
obj.foo.addObserver('bar.bat', obj, function () {
|
53915
|
-
callCount++;
|
53916
|
-
});
|
53917
|
-
|
53918
|
-
(0, _emberMetal.run)(function () {
|
53919
|
-
obj.foo.set('bar', null);
|
53920
|
-
});
|
53921
|
-
|
53922
|
-
equal(callCount, 1, 'changing bar should trigger observer');
|
53923
|
-
expect(1);
|
53924
|
-
});
|
53925
53443
|
});
|
53926
53444
|
QUnit.module('ESLint | ember-runtime/tests/legacy_1x/mixins/observable/observable_test.js');
|
53927
53445
|
QUnit.test('should pass ESLint', function(assert) {
|
@@ -54124,319 +53642,6 @@ QUnit.test('should pass ESLint', function(assert) {
|
|
54124
53642
|
assert.ok(true, 'ember-runtime/tests/legacy_1x/mixins/observable/propertyChanges_test.js should pass ESLint\n\n');
|
54125
53643
|
});
|
54126
53644
|
|
54127
|
-
enifed('ember-runtime/tests/legacy_1x/system/binding_test', ['ember-environment', 'ember-metal', 'ember-runtime/system/object'], function (_emberEnvironment, _emberMetal, _object) {
|
54128
|
-
'use strict';
|
54129
|
-
|
54130
|
-
/*
|
54131
|
-
NOTE: This test is adapted from the 1.x series of unit tests. The tests
|
54132
|
-
are the same except for places where we intend to break the API we instead
|
54133
|
-
validate that we warn the developer appropriately.
|
54134
|
-
|
54135
|
-
CHANGES FROM 1.6:
|
54136
|
-
|
54137
|
-
* All calls to run.sync() were changed to
|
54138
|
-
run.sync()
|
54139
|
-
|
54140
|
-
* Bindings no longer accept a root object as their second param. Instead
|
54141
|
-
our test binding objects were put under a single object they could
|
54142
|
-
originate from.
|
54143
|
-
|
54144
|
-
* tests that inspected internal properties were removed.
|
54145
|
-
|
54146
|
-
* converted foo.get/foo.set to use get/Ember.set
|
54147
|
-
|
54148
|
-
* Removed tests for Binding.isConnected. Since binding instances are now
|
54149
|
-
shared this property no longer makes sense.
|
54150
|
-
|
54151
|
-
* Changed call calls for obj.bind(...) to bind(obj, ...);
|
54152
|
-
|
54153
|
-
* Changed all calls to sc_super() to this._super(...arguments)
|
54154
|
-
|
54155
|
-
* Changed all calls to disconnect() to pass the root object.
|
54156
|
-
|
54157
|
-
* removed calls to Binding.destroy() as that method is no longer useful
|
54158
|
-
(or defined)
|
54159
|
-
|
54160
|
-
* changed use of T_STRING to 'string'
|
54161
|
-
*/
|
54162
|
-
|
54163
|
-
// ========================================================================
|
54164
|
-
// Binding Tests
|
54165
|
-
// ========================================================================
|
54166
|
-
|
54167
|
-
var TestNamespace = void 0,
|
54168
|
-
fromObject = void 0,
|
54169
|
-
toObject = void 0,
|
54170
|
-
binding = void 0,
|
54171
|
-
Bon1 = void 0,
|
54172
|
-
bon2 = void 0,
|
54173
|
-
root = void 0; // global variables
|
54174
|
-
var originalLookup = _emberEnvironment.context.lookup;
|
54175
|
-
var lookup = void 0;
|
54176
|
-
|
54177
|
-
QUnit.module('basic object binding', {
|
54178
|
-
setup: function () {
|
54179
|
-
fromObject = _object.default.create({ value: 'start' });
|
54180
|
-
toObject = _object.default.create({ value: 'end' });
|
54181
|
-
root = { fromObject: fromObject, toObject: toObject };
|
54182
|
-
(0, _emberMetal.run)(function () {
|
54183
|
-
expectDeprecation(function () {
|
54184
|
-
binding = (0, _emberMetal.bind)(root, 'toObject.value', 'fromObject.value');
|
54185
|
-
}, /`Ember\.Binding` is deprecated./);
|
54186
|
-
});
|
54187
|
-
}
|
54188
|
-
});
|
54189
|
-
|
54190
|
-
QUnit.test('binding should have synced on connect', function () {
|
54191
|
-
equal((0, _emberMetal.get)(toObject, 'value'), 'start', 'toObject.value should match fromObject.value');
|
54192
|
-
});
|
54193
|
-
|
54194
|
-
QUnit.test('fromObject change should propagate to toObject only after flush', function () {
|
54195
|
-
(0, _emberMetal.run)(function () {
|
54196
|
-
(0, _emberMetal.set)(fromObject, 'value', 'change');
|
54197
|
-
equal((0, _emberMetal.get)(toObject, 'value'), 'start');
|
54198
|
-
});
|
54199
|
-
equal((0, _emberMetal.get)(toObject, 'value'), 'change');
|
54200
|
-
});
|
54201
|
-
|
54202
|
-
QUnit.test('toObject change should propagate to fromObject only after flush', function () {
|
54203
|
-
(0, _emberMetal.run)(function () {
|
54204
|
-
(0, _emberMetal.set)(toObject, 'value', 'change');
|
54205
|
-
equal((0, _emberMetal.get)(fromObject, 'value'), 'start');
|
54206
|
-
});
|
54207
|
-
equal((0, _emberMetal.get)(fromObject, 'value'), 'change');
|
54208
|
-
});
|
54209
|
-
|
54210
|
-
QUnit.test('deferred observing during bindings', function () {
|
54211
|
-
// setup special binding
|
54212
|
-
fromObject = _object.default.create({
|
54213
|
-
value1: 'value1',
|
54214
|
-
value2: 'value2'
|
54215
|
-
});
|
54216
|
-
|
54217
|
-
toObject = _object.default.extend({
|
54218
|
-
observer: (0, _emberMetal.observer)('value1', 'value2', function () {
|
54219
|
-
equal((0, _emberMetal.get)(this, 'value1'), 'CHANGED', 'value1 when observer fires');
|
54220
|
-
equal((0, _emberMetal.get)(this, 'value2'), 'CHANGED', 'value2 when observer fires');
|
54221
|
-
this.callCount++;
|
54222
|
-
})
|
54223
|
-
}).create({
|
54224
|
-
value1: 'value1',
|
54225
|
-
value2: 'value2',
|
54226
|
-
|
54227
|
-
callCount: 0
|
54228
|
-
});
|
54229
|
-
|
54230
|
-
var root = { fromObject: fromObject, toObject: toObject };
|
54231
|
-
(0, _emberMetal.run)(function () {
|
54232
|
-
expectDeprecation(function () {
|
54233
|
-
(0, _emberMetal.bind)(root, 'toObject.value1', 'fromObject.value1');
|
54234
|
-
}, /`Ember\.Binding` is deprecated./);
|
54235
|
-
|
54236
|
-
expectDeprecation(function () {
|
54237
|
-
(0, _emberMetal.bind)(root, 'toObject.value2', 'fromObject.value2');
|
54238
|
-
}, /`Ember\.Binding` is deprecated./);
|
54239
|
-
|
54240
|
-
// change both value1 + value2, then flush bindings. observer should only
|
54241
|
-
// fire after bindings are done flushing.
|
54242
|
-
(0, _emberMetal.set)(fromObject, 'value1', 'CHANGED');
|
54243
|
-
(0, _emberMetal.set)(fromObject, 'value2', 'CHANGED');
|
54244
|
-
});
|
54245
|
-
|
54246
|
-
equal(toObject.callCount, 2, 'should call observer twice');
|
54247
|
-
});
|
54248
|
-
|
54249
|
-
QUnit.test('binding disconnection actually works', function () {
|
54250
|
-
binding.disconnect(root);
|
54251
|
-
(0, _emberMetal.run)(function () {
|
54252
|
-
(0, _emberMetal.set)(fromObject, 'value', 'change');
|
54253
|
-
});
|
54254
|
-
equal((0, _emberMetal.get)(toObject, 'value'), 'start');
|
54255
|
-
});
|
54256
|
-
|
54257
|
-
var first = void 0,
|
54258
|
-
second = void 0,
|
54259
|
-
third = void 0; // global variables
|
54260
|
-
|
54261
|
-
// ..........................................................
|
54262
|
-
// chained binding
|
54263
|
-
//
|
54264
|
-
|
54265
|
-
QUnit.module('chained binding', {
|
54266
|
-
setup: function () {
|
54267
|
-
(0, _emberMetal.run)(function () {
|
54268
|
-
first = _object.default.create({ output: 'first' });
|
54269
|
-
|
54270
|
-
second = _object.default.extend({
|
54271
|
-
inputDidChange: (0, _emberMetal.observer)('input', function () {
|
54272
|
-
(0, _emberMetal.set)(this, 'output', (0, _emberMetal.get)(this, 'input'));
|
54273
|
-
})
|
54274
|
-
}).create({
|
54275
|
-
input: 'second',
|
54276
|
-
output: 'second'
|
54277
|
-
});
|
54278
|
-
|
54279
|
-
third = _object.default.create({ input: 'third' });
|
54280
|
-
|
54281
|
-
root = { first: first, second: second, third: third };
|
54282
|
-
|
54283
|
-
expectDeprecation(function () {
|
54284
|
-
(0, _emberMetal.bind)(root, 'second.input', 'first.output');
|
54285
|
-
}, /`Ember\.Binding` is deprecated./);
|
54286
|
-
|
54287
|
-
expectDeprecation(function () {
|
54288
|
-
(0, _emberMetal.bind)(root, 'second.output', 'third.input');
|
54289
|
-
}, /`Ember\.Binding` is deprecated./);
|
54290
|
-
});
|
54291
|
-
},
|
54292
|
-
teardown: function () {
|
54293
|
-
_emberMetal.run.cancelTimers();
|
54294
|
-
}
|
54295
|
-
});
|
54296
|
-
|
54297
|
-
QUnit.test('changing first output should propagate to third after flush', function () {
|
54298
|
-
(0, _emberMetal.run)(function () {
|
54299
|
-
(0, _emberMetal.set)(first, 'output', 'change');
|
54300
|
-
equal('change', (0, _emberMetal.get)(first, 'output'), 'first.output');
|
54301
|
-
ok('change' !== (0, _emberMetal.get)(third, 'input'), 'third.input');
|
54302
|
-
});
|
54303
|
-
|
54304
|
-
equal('change', (0, _emberMetal.get)(first, 'output'), 'first.output');
|
54305
|
-
equal('change', (0, _emberMetal.get)(second, 'input'), 'second.input');
|
54306
|
-
equal('change', (0, _emberMetal.get)(second, 'output'), 'second.output');
|
54307
|
-
equal('change', (0, _emberMetal.get)(third, 'input'), 'third.input');
|
54308
|
-
});
|
54309
|
-
|
54310
|
-
// ..........................................................
|
54311
|
-
// Custom Binding
|
54312
|
-
//
|
54313
|
-
|
54314
|
-
QUnit.module('Custom Binding', {
|
54315
|
-
setup: function () {
|
54316
|
-
_emberEnvironment.context.lookup = lookup = {};
|
54317
|
-
|
54318
|
-
Bon1 = _object.default.extend({
|
54319
|
-
value1: 'hi',
|
54320
|
-
value2: 83,
|
54321
|
-
array1: []
|
54322
|
-
});
|
54323
|
-
|
54324
|
-
bon2 = _object.default.create({
|
54325
|
-
val1: 'hello',
|
54326
|
-
val2: 25,
|
54327
|
-
arr: [1, 2, 3, 4]
|
54328
|
-
});
|
54329
|
-
|
54330
|
-
_emberEnvironment.context.lookup['TestNamespace'] = TestNamespace = {
|
54331
|
-
bon2: bon2,
|
54332
|
-
Bon1: Bon1
|
54333
|
-
};
|
54334
|
-
},
|
54335
|
-
teardown: function () {
|
54336
|
-
_emberEnvironment.context.lookup = originalLookup;
|
54337
|
-
Bon1 = bon2 = TestNamespace = null;
|
54338
|
-
_emberMetal.run.cancelTimers();
|
54339
|
-
}
|
54340
|
-
});
|
54341
|
-
|
54342
|
-
QUnit.test('two bindings to the same value should sync in the order they are initialized', function () {
|
54343
|
-
_emberMetal.run.begin();
|
54344
|
-
|
54345
|
-
var a = _object.default.create({
|
54346
|
-
foo: 'bar'
|
54347
|
-
});
|
54348
|
-
|
54349
|
-
var b = _object.default.extend({
|
54350
|
-
C: _object.default.extend({
|
54351
|
-
foo: 'bee',
|
54352
|
-
fooBinding: 'owner.foo'
|
54353
|
-
}),
|
54354
|
-
|
54355
|
-
init: function () {
|
54356
|
-
this._super.apply(this, arguments);
|
54357
|
-
(0, _emberMetal.set)(this, 'c', this.C.create({ owner: this }));
|
54358
|
-
}
|
54359
|
-
});
|
54360
|
-
|
54361
|
-
expectDeprecation(function () {
|
54362
|
-
b = b.create({
|
54363
|
-
foo: 'baz',
|
54364
|
-
fooBinding: 'a.foo',
|
54365
|
-
a: a
|
54366
|
-
});
|
54367
|
-
}, /`Ember\.Binding` is deprecated./);
|
54368
|
-
|
54369
|
-
_emberMetal.run.end();
|
54370
|
-
|
54371
|
-
equal((0, _emberMetal.get)(a, 'foo'), 'bar', 'a.foo should not change');
|
54372
|
-
equal((0, _emberMetal.get)(b, 'foo'), 'bar', 'a.foo should propagate up to b.foo');
|
54373
|
-
equal((0, _emberMetal.get)(b.c, 'foo'), 'bar', 'a.foo should propagate up to b.c.foo');
|
54374
|
-
});
|
54375
|
-
|
54376
|
-
// ..........................................................
|
54377
|
-
// propertyNameBinding with longhand
|
54378
|
-
//
|
54379
|
-
|
54380
|
-
QUnit.module('propertyNameBinding with longhand', {
|
54381
|
-
setup: function () {
|
54382
|
-
_emberEnvironment.context.lookup = lookup = {};
|
54383
|
-
|
54384
|
-
lookup['TestNamespace'] = TestNamespace = {};
|
54385
|
-
(0, _emberMetal.run)(function () {
|
54386
|
-
TestNamespace.fromObject = _object.default.create({
|
54387
|
-
value: 'originalValue'
|
54388
|
-
});
|
54389
|
-
|
54390
|
-
expectDeprecation(function () {
|
54391
|
-
TestNamespace.toObject = _object.default.extend({
|
54392
|
-
valueBinding: _emberMetal.Binding.from('TestNamespace.fromObject.value'),
|
54393
|
-
relativeBinding: _emberMetal.Binding.from('localValue')
|
54394
|
-
}).create({
|
54395
|
-
localValue: 'originalLocal'
|
54396
|
-
});
|
54397
|
-
}, /`Ember\.Binding` is deprecated./);
|
54398
|
-
});
|
54399
|
-
},
|
54400
|
-
teardown: function () {
|
54401
|
-
TestNamespace = undefined;
|
54402
|
-
_emberEnvironment.context.lookup = originalLookup;
|
54403
|
-
}
|
54404
|
-
});
|
54405
|
-
|
54406
|
-
QUnit.test('works with full path', function () {
|
54407
|
-
(0, _emberMetal.run)(function () {
|
54408
|
-
return (0, _emberMetal.set)(TestNamespace.fromObject, 'value', 'updatedValue');
|
54409
|
-
});
|
54410
|
-
|
54411
|
-
equal((0, _emberMetal.get)(TestNamespace.toObject, 'value'), 'updatedValue');
|
54412
|
-
|
54413
|
-
(0, _emberMetal.run)(function () {
|
54414
|
-
return (0, _emberMetal.set)(TestNamespace.fromObject, 'value', 'newerValue');
|
54415
|
-
});
|
54416
|
-
|
54417
|
-
equal((0, _emberMetal.get)(TestNamespace.toObject, 'value'), 'newerValue');
|
54418
|
-
});
|
54419
|
-
|
54420
|
-
QUnit.test('works with local path', function () {
|
54421
|
-
(0, _emberMetal.run)(function () {
|
54422
|
-
return (0, _emberMetal.set)(TestNamespace.toObject, 'localValue', 'updatedValue');
|
54423
|
-
});
|
54424
|
-
|
54425
|
-
equal((0, _emberMetal.get)(TestNamespace.toObject, 'relative'), 'updatedValue');
|
54426
|
-
|
54427
|
-
(0, _emberMetal.run)(function () {
|
54428
|
-
return (0, _emberMetal.set)(TestNamespace.toObject, 'localValue', 'newerValue');
|
54429
|
-
});
|
54430
|
-
|
54431
|
-
equal((0, _emberMetal.get)(TestNamespace.toObject, 'relative'), 'newerValue');
|
54432
|
-
});
|
54433
|
-
});
|
54434
|
-
QUnit.module('ESLint | ember-runtime/tests/legacy_1x/system/binding_test.js');
|
54435
|
-
QUnit.test('should pass ESLint', function(assert) {
|
54436
|
-
assert.expect(1);
|
54437
|
-
assert.ok(true, 'ember-runtime/tests/legacy_1x/system/binding_test.js should pass ESLint\n\n');
|
54438
|
-
});
|
54439
|
-
|
54440
53645
|
enifed('ember-runtime/tests/legacy_1x/system/object/base_test', ['ember-metal', 'ember-runtime/system/object'], function (_emberMetal, _object) {
|
54441
53646
|
'use strict';
|
54442
53647
|
|
@@ -54534,179 +53739,6 @@ QUnit.test('should pass ESLint', function(assert) {
|
|
54534
53739
|
assert.ok(true, 'ember-runtime/tests/legacy_1x/system/object/base_test.js should pass ESLint\n\n');
|
54535
53740
|
});
|
54536
53741
|
|
54537
|
-
enifed('ember-runtime/tests/legacy_1x/system/object/bindings_test', ['ember-environment', 'ember-metal', 'ember-runtime/system/object'], function (_emberEnvironment, _emberMetal, _object) {
|
54538
|
-
'use strict';
|
54539
|
-
|
54540
|
-
/*
|
54541
|
-
NOTE: This test is adapted from the 1.x series of unit tests. The tests
|
54542
|
-
are the same except for places where we intend to break the API we instead
|
54543
|
-
validate that we warn the developer appropriately.
|
54544
|
-
|
54545
|
-
CHANGES FROM 1.6:
|
54546
|
-
|
54547
|
-
* changed Ember.Bending.flushPendingChanges() -> run.sync();
|
54548
|
-
* changes obj.set() and obj.get() to Ember.set() and Ember.get()
|
54549
|
-
* Fixed an actual bug in unit tests around line 133
|
54550
|
-
* fixed 'bindings should disconnect on destroy' test to use destroy.
|
54551
|
-
*/
|
54552
|
-
|
54553
|
-
// ========================================================================
|
54554
|
-
// EmberObject bindings Tests
|
54555
|
-
// ========================================================================
|
54556
|
-
|
54557
|
-
var originalLookup = _emberEnvironment.context.lookup;
|
54558
|
-
var testObject = void 0,
|
54559
|
-
fromObject = void 0,
|
54560
|
-
TestObject = void 0;
|
54561
|
-
var TestNamespace = void 0,
|
54562
|
-
lookup = void 0;
|
54563
|
-
|
54564
|
-
QUnit.module('bind() method', {
|
54565
|
-
setup: function () {
|
54566
|
-
_emberEnvironment.context.lookup = lookup = {};
|
54567
|
-
|
54568
|
-
testObject = _object.default.create({
|
54569
|
-
foo: 'bar',
|
54570
|
-
bar: 'foo',
|
54571
|
-
extraObject: null
|
54572
|
-
});
|
54573
|
-
|
54574
|
-
fromObject = _object.default.create({
|
54575
|
-
bar: 'foo',
|
54576
|
-
extraObject: null
|
54577
|
-
});
|
54578
|
-
|
54579
|
-
lookup['TestNamespace'] = TestNamespace = {
|
54580
|
-
fromObject: fromObject,
|
54581
|
-
testObject: testObject
|
54582
|
-
};
|
54583
|
-
},
|
54584
|
-
teardown: function () {
|
54585
|
-
testObject = fromObject = null;
|
54586
|
-
_emberEnvironment.context.lookup = originalLookup;
|
54587
|
-
}
|
54588
|
-
});
|
54589
|
-
|
54590
|
-
QUnit.test('bind(TestNamespace.fromObject.bar) should follow absolute path', function () {
|
54591
|
-
(0, _emberMetal.run)(function () {
|
54592
|
-
expectDeprecation(function () {
|
54593
|
-
// create binding
|
54594
|
-
testObject.bind('foo', 'TestNamespace.fromObject.bar');
|
54595
|
-
}, /`Ember.Binding` is deprecated/);
|
54596
|
-
|
54597
|
-
// now make a change to see if the binding triggers.
|
54598
|
-
(0, _emberMetal.set)(fromObject, 'bar', 'changedValue');
|
54599
|
-
});
|
54600
|
-
|
54601
|
-
equal('changedValue', (0, _emberMetal.get)(testObject, 'foo'), 'testObject.foo');
|
54602
|
-
});
|
54603
|
-
|
54604
|
-
QUnit.test('bind(.bar) should bind to relative path', function () {
|
54605
|
-
(0, _emberMetal.run)(function () {
|
54606
|
-
expectDeprecation(function () {
|
54607
|
-
// create binding
|
54608
|
-
testObject.bind('foo', 'bar');
|
54609
|
-
}, /`Ember.Binding` is deprecated/);
|
54610
|
-
|
54611
|
-
// now make a change to see if the binding triggers.
|
54612
|
-
(0, _emberMetal.set)(testObject, 'bar', 'changedValue');
|
54613
|
-
});
|
54614
|
-
|
54615
|
-
equal('changedValue', (0, _emberMetal.get)(testObject, 'foo'), 'testObject.foo');
|
54616
|
-
});
|
54617
|
-
|
54618
|
-
QUnit.module('fooBinding method', {
|
54619
|
-
setup: function () {
|
54620
|
-
_emberEnvironment.context.lookup = lookup = {};
|
54621
|
-
|
54622
|
-
TestObject = _object.default.extend({
|
54623
|
-
foo: 'bar',
|
54624
|
-
bar: 'foo',
|
54625
|
-
extraObject: null
|
54626
|
-
});
|
54627
|
-
|
54628
|
-
fromObject = _object.default.create({
|
54629
|
-
bar: 'foo',
|
54630
|
-
extraObject: null
|
54631
|
-
});
|
54632
|
-
|
54633
|
-
lookup['TestNamespace'] = TestNamespace = {
|
54634
|
-
fromObject: fromObject,
|
54635
|
-
testObject: TestObject
|
54636
|
-
};
|
54637
|
-
},
|
54638
|
-
teardown: function () {
|
54639
|
-
_emberEnvironment.context.lookup = originalLookup;
|
54640
|
-
TestObject = fromObject = null;
|
54641
|
-
// delete TestNamespace;
|
54642
|
-
}
|
54643
|
-
});
|
54644
|
-
|
54645
|
-
var deprecationMessage = /`Ember.Binding` is deprecated/;
|
54646
|
-
|
54647
|
-
QUnit.test('fooBinding: TestNamespace.fromObject.bar should follow absolute path', function () {
|
54648
|
-
(0, _emberMetal.run)(function () {
|
54649
|
-
expectDeprecation(function () {
|
54650
|
-
// create binding
|
54651
|
-
testObject = TestObject.extend({
|
54652
|
-
fooBinding: 'TestNamespace.fromObject.bar'
|
54653
|
-
}).create();
|
54654
|
-
}, deprecationMessage);
|
54655
|
-
|
54656
|
-
// now make a change to see if the binding triggers.
|
54657
|
-
(0, _emberMetal.set)(fromObject, 'bar', 'changedValue');
|
54658
|
-
});
|
54659
|
-
|
54660
|
-
equal('changedValue', (0, _emberMetal.get)(testObject, 'foo'), 'testObject.foo');
|
54661
|
-
});
|
54662
|
-
|
54663
|
-
QUnit.test('fooBinding: .bar should bind to relative path', function () {
|
54664
|
-
(0, _emberMetal.run)(function () {
|
54665
|
-
expectDeprecation(function () {
|
54666
|
-
// create binding
|
54667
|
-
testObject = TestObject.extend({
|
54668
|
-
fooBinding: 'bar'
|
54669
|
-
}).create();
|
54670
|
-
}, deprecationMessage);
|
54671
|
-
|
54672
|
-
// now make a change to see if the binding triggers.
|
54673
|
-
(0, _emberMetal.set)(testObject, 'bar', 'changedValue');
|
54674
|
-
});
|
54675
|
-
|
54676
|
-
equal('changedValue', (0, _emberMetal.get)(testObject, 'foo'), 'testObject.foo');
|
54677
|
-
});
|
54678
|
-
|
54679
|
-
QUnit.test('fooBinding: should disconnect bindings when destroyed', function () {
|
54680
|
-
(0, _emberMetal.run)(function () {
|
54681
|
-
expectDeprecation(function () {
|
54682
|
-
// create binding
|
54683
|
-
testObject = TestObject.extend({
|
54684
|
-
fooBinding: 'TestNamespace.fromObject.bar'
|
54685
|
-
}).create();
|
54686
|
-
}, deprecationMessage);
|
54687
|
-
|
54688
|
-
(0, _emberMetal.set)(TestNamespace.fromObject, 'bar', 'BAZ');
|
54689
|
-
});
|
54690
|
-
|
54691
|
-
equal((0, _emberMetal.get)(testObject, 'foo'), 'BAZ', 'binding should have synced');
|
54692
|
-
|
54693
|
-
(0, _emberMetal.run)(function () {
|
54694
|
-
return testObject.destroy();
|
54695
|
-
});
|
54696
|
-
|
54697
|
-
(0, _emberMetal.run)(function () {
|
54698
|
-
return (0, _emberMetal.set)(TestNamespace.fromObject, 'bar', 'BIFF');
|
54699
|
-
});
|
54700
|
-
|
54701
|
-
ok((0, _emberMetal.get)(testObject, 'foo') !== 'bar', 'binding should not have synced');
|
54702
|
-
});
|
54703
|
-
});
|
54704
|
-
QUnit.module('ESLint | ember-runtime/tests/legacy_1x/system/object/bindings_test.js');
|
54705
|
-
QUnit.test('should pass ESLint', function(assert) {
|
54706
|
-
assert.expect(1);
|
54707
|
-
assert.ok(true, 'ember-runtime/tests/legacy_1x/system/object/bindings_test.js should pass ESLint\n\n');
|
54708
|
-
});
|
54709
|
-
|
54710
53742
|
enifed('ember-runtime/tests/legacy_1x/system/object/concatenated_test', ['ember-metal', 'ember-runtime/system/object'], function (_emberMetal, _object) {
|
54711
53743
|
'use strict';
|
54712
53744
|
|
@@ -54817,120 +53849,6 @@ QUnit.test('should pass ESLint', function(assert) {
|
|
54817
53849
|
assert.ok(true, 'ember-runtime/tests/legacy_1x/system/object/concatenated_test.js should pass ESLint\n\n');
|
54818
53850
|
});
|
54819
53851
|
|
54820
|
-
enifed('ember-runtime/tests/legacy_1x/system/run_loop_test', ['ember-metal', 'ember-runtime/mixins/observable', 'ember-runtime/system/object'], function (_emberMetal, _observable, _object) {
|
54821
|
-
'use strict';
|
54822
|
-
|
54823
|
-
/*
|
54824
|
-
NOTE: This test is adapted from the 1.x series of unit tests. The tests
|
54825
|
-
are the same except for places where we intend to break the API we instead
|
54826
|
-
validate that we warn the developer appropriately.
|
54827
|
-
|
54828
|
-
CHANGES FROM 1.6:
|
54829
|
-
|
54830
|
-
* Updated the API usage for setting up and syncing Binding since these
|
54831
|
-
are not the APIs this file is testing.
|
54832
|
-
|
54833
|
-
* Disabled a call to invokeOnce() around line 127 because it appeared to be
|
54834
|
-
broken anyway. I don't think it ever even worked.
|
54835
|
-
*/
|
54836
|
-
|
54837
|
-
var MyApp = void 0;
|
54838
|
-
|
54839
|
-
QUnit.module('System:run_loop() - chained binding', {
|
54840
|
-
setup: function () {
|
54841
|
-
MyApp = {};
|
54842
|
-
MyApp.first = _object.default.extend(_observable.default).create({
|
54843
|
-
output: 'MyApp.first'
|
54844
|
-
});
|
54845
|
-
|
54846
|
-
MyApp.second = _object.default.extend(_observable.default, {
|
54847
|
-
inputDidChange: (0, _emberMetal.observer)('input', function () {
|
54848
|
-
this.set('output', this.get('input'));
|
54849
|
-
})
|
54850
|
-
}).create({
|
54851
|
-
input: 'MyApp.second',
|
54852
|
-
output: 'MyApp.second'
|
54853
|
-
});
|
54854
|
-
|
54855
|
-
MyApp.third = _object.default.extend(_observable.default).create({
|
54856
|
-
input: 'MyApp.third'
|
54857
|
-
});
|
54858
|
-
}
|
54859
|
-
});
|
54860
|
-
|
54861
|
-
var deprecationMessage = /`Ember.Binding` is deprecated/;
|
54862
|
-
|
54863
|
-
QUnit.test('Should propagate bindings after the RunLoop completes (using Ember.RunLoop)', function () {
|
54864
|
-
(0, _emberMetal.run)(function () {
|
54865
|
-
//Binding of output of MyApp.first object to input of MyApp.second object
|
54866
|
-
expectDeprecation(function () {
|
54867
|
-
_emberMetal.Binding.from('first.output').to('second.input').connect(MyApp);
|
54868
|
-
}, deprecationMessage);
|
54869
|
-
|
54870
|
-
//Binding of output of MyApp.second object to input of MyApp.third object
|
54871
|
-
expectDeprecation(function () {
|
54872
|
-
_emberMetal.Binding.from('second.output').to('third.input').connect(MyApp);
|
54873
|
-
}, deprecationMessage);
|
54874
|
-
});
|
54875
|
-
|
54876
|
-
(0, _emberMetal.run)(function () {
|
54877
|
-
// Based on the above binding if you change the output of MyApp.first
|
54878
|
-
// object it should change the all the variable of
|
54879
|
-
// MyApp.first,MyApp.second and MyApp.third object
|
54880
|
-
MyApp.first.set('output', 'change');
|
54881
|
-
|
54882
|
-
//Changes the output of the MyApp.first object
|
54883
|
-
equal(MyApp.first.get('output'), 'change');
|
54884
|
-
|
54885
|
-
//since binding has not taken into effect the value still remains as change.
|
54886
|
-
equal(MyApp.second.get('output'), 'MyApp.first');
|
54887
|
-
}); // allows bindings to trigger...
|
54888
|
-
|
54889
|
-
//Value of the output variable changed to 'change'
|
54890
|
-
equal(MyApp.first.get('output'), 'change');
|
54891
|
-
|
54892
|
-
//Since binding triggered after the end loop the value changed to 'change'.
|
54893
|
-
equal(MyApp.second.get('output'), 'change');
|
54894
|
-
});
|
54895
|
-
|
54896
|
-
QUnit.test('Should propagate bindings after the RunLoop completes', function () {
|
54897
|
-
(0, _emberMetal.run)(function () {
|
54898
|
-
//Binding of output of MyApp.first object to input of MyApp.second object
|
54899
|
-
expectDeprecation(function () {
|
54900
|
-
_emberMetal.Binding.from('first.output').to('second.input').connect(MyApp);
|
54901
|
-
}, deprecationMessage);
|
54902
|
-
|
54903
|
-
//Binding of output of MyApp.second object to input of MyApp.third object
|
54904
|
-
expectDeprecation(function () {
|
54905
|
-
_emberMetal.Binding.from('second.output').to('third.input').connect(MyApp);
|
54906
|
-
}, deprecationMessage);
|
54907
|
-
});
|
54908
|
-
|
54909
|
-
(0, _emberMetal.run)(function () {
|
54910
|
-
//Based on the above binding if you change the output of MyApp.first object it should
|
54911
|
-
//change the all the variable of MyApp.first,MyApp.second and MyApp.third object
|
54912
|
-
MyApp.first.set('output', 'change');
|
54913
|
-
|
54914
|
-
//Changes the output of the MyApp.first object
|
54915
|
-
equal(MyApp.first.get('output'), 'change');
|
54916
|
-
|
54917
|
-
//since binding has not taken into effect the value still remains as change.
|
54918
|
-
equal(MyApp.second.get('output'), 'MyApp.first');
|
54919
|
-
});
|
54920
|
-
|
54921
|
-
//Value of the output variable changed to 'change'
|
54922
|
-
equal(MyApp.first.get('output'), 'change');
|
54923
|
-
|
54924
|
-
//Since binding triggered after the end loop the value changed to 'change'.
|
54925
|
-
equal(MyApp.second.get('output'), 'change');
|
54926
|
-
});
|
54927
|
-
});
|
54928
|
-
QUnit.module('ESLint | ember-runtime/tests/legacy_1x/system/run_loop_test.js');
|
54929
|
-
QUnit.test('should pass ESLint', function(assert) {
|
54930
|
-
assert.expect(1);
|
54931
|
-
assert.ok(true, 'ember-runtime/tests/legacy_1x/system/run_loop_test.js should pass ESLint\n\n');
|
54932
|
-
});
|
54933
|
-
|
54934
53852
|
enifed('ember-runtime/tests/main_test', ['ember-runtime/index'], function (_index) {
|
54935
53853
|
'use strict';
|
54936
53854
|
|
@@ -61657,21 +60575,6 @@ enifed('ember-runtime/tests/system/object/create_test', ['ember-metal', 'ember/f
|
|
61657
60575
|
});
|
61658
60576
|
}
|
61659
60577
|
|
61660
|
-
QUnit.test('allows bindings to be defined', function () {
|
61661
|
-
var obj = void 0;
|
61662
|
-
|
61663
|
-
var deprecationMessage = /`Ember.Binding` is deprecated/;
|
61664
|
-
|
61665
|
-
expectDeprecation(function () {
|
61666
|
-
obj = _object.default.create({
|
61667
|
-
foo: 'foo',
|
61668
|
-
barBinding: 'foo'
|
61669
|
-
});
|
61670
|
-
}, deprecationMessage);
|
61671
|
-
|
61672
|
-
equal(obj.get('bar'), 'foo', 'The binding value is correct');
|
61673
|
-
});
|
61674
|
-
|
61675
60578
|
QUnit.test('calls setUnknownProperty if defined', function () {
|
61676
60579
|
var setUnknownPropertyCalled = false;
|
61677
60580
|
|
@@ -61739,12 +60642,6 @@ enifed('ember-runtime/tests/system/object/create_test', ['ember-metal', 'ember/f
|
|
61739
60642
|
var o = _object.default.create(null);
|
61740
60643
|
deepEqual(_object.default.create(), o);
|
61741
60644
|
});
|
61742
|
-
|
61743
|
-
QUnit.test('EmberObject.create avoids allocating a binding map when not necessary', function () {
|
61744
|
-
var o = _object.default.create();
|
61745
|
-
var m = (0, _emberMetal.meta)(o);
|
61746
|
-
ok(!m.peekBindings(), 'A binding map is not allocated');
|
61747
|
-
});
|
61748
60645
|
});
|
61749
60646
|
QUnit.module('ESLint | ember-runtime/tests/system/object/create_test.js');
|
61750
60647
|
QUnit.test('should pass ESLint', function(assert) {
|
@@ -61892,36 +60789,6 @@ enifed('ember-runtime/tests/system/object/destroy_test', ['ember-metal', 'intern
|
|
61892
60789
|
equal(shouldNotChange, 0, 'destroyed graph objs should not see change in willDestroy');
|
61893
60790
|
equal(shouldChange, 1, 'long lived should see change in willDestroy');
|
61894
60791
|
});
|
61895
|
-
|
61896
|
-
QUnit.test('bindings should be synced when are updated in the willDestroy hook', function () {
|
61897
|
-
var bar = _object.default.create({
|
61898
|
-
value: false,
|
61899
|
-
willDestroy: function () {
|
61900
|
-
this.set('value', true);
|
61901
|
-
}
|
61902
|
-
});
|
61903
|
-
|
61904
|
-
var foo = _object.default.create({
|
61905
|
-
value: null,
|
61906
|
-
bar: bar
|
61907
|
-
});
|
61908
|
-
|
61909
|
-
(0, _emberMetal.run)(function () {
|
61910
|
-
var deprecationMessage = /`Ember.Binding` is deprecated/;
|
61911
|
-
|
61912
|
-
expectDeprecation(function () {
|
61913
|
-
(0, _emberMetal.bind)(foo, 'value', 'bar.value');
|
61914
|
-
}, deprecationMessage);
|
61915
|
-
});
|
61916
|
-
|
61917
|
-
ok(bar.get('value') === false, 'the initial value has been bound');
|
61918
|
-
|
61919
|
-
(0, _emberMetal.run)(function () {
|
61920
|
-
return bar.destroy();
|
61921
|
-
});
|
61922
|
-
|
61923
|
-
ok(foo.get('value'), 'foo is synced when the binding is updated in the willDestroy hook');
|
61924
|
-
});
|
61925
60792
|
});
|
61926
60793
|
QUnit.module('ESLint | ember-runtime/tests/system/object/destroy_test.js');
|
61927
60794
|
QUnit.test('should pass ESLint', function(assert) {
|
@@ -62862,62 +61729,6 @@ QUnit.test('should pass ESLint', function(assert) {
|
|
62862
61729
|
assert.ok(true, 'ember-runtime/tests/system/object/strict-mode-test.js should pass ESLint\n\n');
|
62863
61730
|
});
|
62864
61731
|
|
62865
|
-
enifed('ember-runtime/tests/system/object/subclasses_test', ['ember-metal', 'ember-runtime/system/object'], function (_emberMetal, _object) {
|
62866
|
-
'use strict';
|
62867
|
-
|
62868
|
-
QUnit.module('system/object/subclasses');
|
62869
|
-
|
62870
|
-
QUnit.test('chains should copy forward to subclasses when prototype created', function () {
|
62871
|
-
var ObjectWithChains = void 0,
|
62872
|
-
objWithChains = void 0,
|
62873
|
-
SubWithChains = void 0,
|
62874
|
-
SubSub = void 0,
|
62875
|
-
subSub = void 0;
|
62876
|
-
(0, _emberMetal.run)(function () {
|
62877
|
-
ObjectWithChains = _object.default.extend({
|
62878
|
-
obj: {
|
62879
|
-
a: 'a',
|
62880
|
-
hi: 'hi'
|
62881
|
-
},
|
62882
|
-
aBinding: 'obj.a' // add chain
|
62883
|
-
});
|
62884
|
-
|
62885
|
-
var deprecationMessage = /`Ember.Binding` is deprecated/;
|
62886
|
-
|
62887
|
-
expectDeprecation(function () {
|
62888
|
-
// realize prototype
|
62889
|
-
objWithChains = ObjectWithChains.create();
|
62890
|
-
}, deprecationMessage);
|
62891
|
-
|
62892
|
-
// should not copy chains from parent yet
|
62893
|
-
SubWithChains = ObjectWithChains.extend({
|
62894
|
-
hiBinding: 'obj.hi', // add chain
|
62895
|
-
hello: (0, _emberMetal.computed)(function () {
|
62896
|
-
return this.get('obj.hi') + ' world';
|
62897
|
-
}).property('hi'), // observe chain
|
62898
|
-
greetingBinding: 'hello'
|
62899
|
-
});
|
62900
|
-
|
62901
|
-
SubSub = SubWithChains.extend();
|
62902
|
-
|
62903
|
-
expectDeprecation(function () {
|
62904
|
-
// should realize prototypes and copy forward chains
|
62905
|
-
subSub = SubSub.create();
|
62906
|
-
}, deprecationMessage);
|
62907
|
-
});
|
62908
|
-
equal(subSub.get('greeting'), 'hi world');
|
62909
|
-
(0, _emberMetal.run)(function () {
|
62910
|
-
return objWithChains.set('obj.hi', 'hello');
|
62911
|
-
});
|
62912
|
-
equal(subSub.get('greeting'), 'hello world');
|
62913
|
-
});
|
62914
|
-
});
|
62915
|
-
QUnit.module('ESLint | ember-runtime/tests/system/object/subclasses_test.js');
|
62916
|
-
QUnit.test('should pass ESLint', function(assert) {
|
62917
|
-
assert.expect(1);
|
62918
|
-
assert.ok(true, 'ember-runtime/tests/system/object/subclasses_test.js should pass ESLint\n\n');
|
62919
|
-
});
|
62920
|
-
|
62921
61732
|
enifed('ember-runtime/tests/system/object/toString_test', ['ember-utils', 'ember-environment', 'ember-runtime/system/object', 'ember-runtime/system/namespace'], function (_emberUtils, _emberEnvironment, _object, _namespace) {
|
62922
61733
|
'use strict';
|
62923
61734
|
|
@@ -71755,7 +70566,7 @@ enifed('ember/tests/reexports_test', ['ember/index', 'ember-environment', 'inter
|
|
71755
70566
|
['computed', 'ember-metal'], ['computed.alias', 'ember-metal', 'alias'], ['ComputedProperty', 'ember-metal'], ['cacheFor', 'ember-metal'], ['merge', 'ember-metal'], ['instrument', 'ember-metal'], ['Instrumentation.instrument', 'ember-metal', 'instrument'], ['Instrumentation.subscribe', 'ember-metal', 'instrumentationSubscribe'], ['Instrumentation.unsubscribe', 'ember-metal', 'instrumentationUnsubscribe'], ['Instrumentation.reset', 'ember-metal', 'instrumentationReset'], ['testing', 'ember-debug', { get: 'isTesting', set: 'setTesting' }], ['onerror', 'ember-metal', { get: 'getOnerror', set: 'setOnerror' }],
|
71756
70567
|
// ['create'], TODO: figure out what to do here
|
71757
70568
|
// ['keys'], TODO: figure out what to do here
|
71758
|
-
['FEATURES', 'ember/features'], ['FEATURES.isEnabled', 'ember-debug', 'isFeatureEnabled'], ['Error', 'ember-debug'], ['meta', 'ember-metal'], ['get', 'ember-metal'], ['set', 'ember-metal'], ['_getPath', 'ember-metal'], ['getWithDefault', 'ember-metal'], ['trySet', 'ember-metal'], ['_Cache', 'ember-metal', 'Cache'], ['on', 'ember-metal'], ['addListener', 'ember-metal'], ['removeListener', 'ember-metal'], ['_suspendListener', 'ember-metal', 'suspendListener'], ['_suspendListeners', 'ember-metal', 'suspendListeners'], ['sendEvent', 'ember-metal'], ['hasListeners', 'ember-metal'], ['watchedEvents', 'ember-metal'], ['listenersFor', 'ember-metal'], ['isNone', 'ember-metal'], ['isEmpty', 'ember-metal'], ['isBlank', 'ember-metal'], ['isPresent', 'ember-metal'], ['_Backburner', 'backburner', 'default'], ['run', 'ember-metal'], ['_ObserverSet', 'ember-metal', 'ObserverSet'], ['propertyWillChange', 'ember-metal'], ['propertyDidChange', 'ember-metal'], ['overrideChains', 'ember-metal'], ['beginPropertyChanges', 'ember-metal'], ['beginPropertyChanges', 'ember-metal'], ['endPropertyChanges', 'ember-metal'], ['changeProperties', 'ember-metal'], ['defineProperty', 'ember-metal'], ['watchKey', 'ember-metal'], ['unwatchKey', 'ember-metal'], ['removeChainWatcher', 'ember-metal'], ['_ChainNode', 'ember-metal', 'ChainNode'], ['finishChains', 'ember-metal'], ['watchPath', 'ember-metal'], ['unwatchPath', 'ember-metal'], ['watch', 'ember-metal'], ['isWatching', 'ember-metal'], ['unwatch', 'ember-metal'], ['destroy', 'ember-metal', 'deleteMeta'], ['libraries', 'ember-metal'], ['OrderedSet', 'ember-metal'], ['Map', 'ember-metal'], ['MapWithDefault', 'ember-metal'], ['getProperties', 'ember-metal'], ['setProperties', 'ember-metal'], ['expandProperties', 'ember-metal'], ['NAME_KEY', 'ember-utils'], ['addObserver', 'ember-metal'], ['observersFor', 'ember-metal'], ['removeObserver', 'ember-metal'], ['_suspendObserver', 'ember-metal'], ['_suspendObservers', 'ember-metal'], ['aliasMethod', 'ember-metal'], ['observer', 'ember-metal'], ['mixin', 'ember-metal'], ['Mixin', 'ember-metal'], ['
|
70569
|
+
['FEATURES', 'ember/features'], ['FEATURES.isEnabled', 'ember-debug', 'isFeatureEnabled'], ['Error', 'ember-debug'], ['meta', 'ember-metal'], ['get', 'ember-metal'], ['set', 'ember-metal'], ['_getPath', 'ember-metal'], ['getWithDefault', 'ember-metal'], ['trySet', 'ember-metal'], ['_Cache', 'ember-metal', 'Cache'], ['on', 'ember-metal'], ['addListener', 'ember-metal'], ['removeListener', 'ember-metal'], ['_suspendListener', 'ember-metal', 'suspendListener'], ['_suspendListeners', 'ember-metal', 'suspendListeners'], ['sendEvent', 'ember-metal'], ['hasListeners', 'ember-metal'], ['watchedEvents', 'ember-metal'], ['listenersFor', 'ember-metal'], ['isNone', 'ember-metal'], ['isEmpty', 'ember-metal'], ['isBlank', 'ember-metal'], ['isPresent', 'ember-metal'], ['_Backburner', 'backburner', 'default'], ['run', 'ember-metal'], ['_ObserverSet', 'ember-metal', 'ObserverSet'], ['propertyWillChange', 'ember-metal'], ['propertyDidChange', 'ember-metal'], ['overrideChains', 'ember-metal'], ['beginPropertyChanges', 'ember-metal'], ['beginPropertyChanges', 'ember-metal'], ['endPropertyChanges', 'ember-metal'], ['changeProperties', 'ember-metal'], ['defineProperty', 'ember-metal'], ['watchKey', 'ember-metal'], ['unwatchKey', 'ember-metal'], ['removeChainWatcher', 'ember-metal'], ['_ChainNode', 'ember-metal', 'ChainNode'], ['finishChains', 'ember-metal'], ['watchPath', 'ember-metal'], ['unwatchPath', 'ember-metal'], ['watch', 'ember-metal'], ['isWatching', 'ember-metal'], ['unwatch', 'ember-metal'], ['destroy', 'ember-metal', 'deleteMeta'], ['libraries', 'ember-metal'], ['OrderedSet', 'ember-metal'], ['Map', 'ember-metal'], ['MapWithDefault', 'ember-metal'], ['getProperties', 'ember-metal'], ['setProperties', 'ember-metal'], ['expandProperties', 'ember-metal'], ['NAME_KEY', 'ember-utils'], ['addObserver', 'ember-metal'], ['observersFor', 'ember-metal'], ['removeObserver', 'ember-metal'], ['_suspendObserver', 'ember-metal'], ['_suspendObservers', 'ember-metal'], ['aliasMethod', 'ember-metal'], ['observer', 'ember-metal'], ['mixin', 'ember-metal'], ['Mixin', 'ember-metal'], ['isGlobalPath', 'ember-metal'],
|
71759
70570
|
|
71760
70571
|
// ember-views
|
71761
70572
|
['$', 'ember-views', 'jQuery'], ['ViewUtils.isSimpleClick', 'ember-views', 'isSimpleClick'], ['ViewUtils.getViewElement', 'ember-views', 'getViewElement'], ['ViewUtils.getViewBounds', 'ember-views', 'getViewBounds'], ['ViewUtils.getViewClientRects', 'ember-views', 'getViewClientRects'], ['ViewUtils.getViewBoundingClientRect', 'ember-views', 'getViewBoundingClientRect'], ['ViewUtils.getRootViews', 'ember-views', 'getRootViews'], ['ViewUtils.getChildViews', 'ember-views', 'getChildViews'], ['TextSupport', 'ember-views'], ['ComponentLookup', 'ember-views'], ['EventDispatcher', 'ember-views'],
|