ember-source 2.16.3 → 2.17.0.beta.4
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 +5 -5
- data/dist/ember-runtime.js +352 -380
- data/dist/ember-template-compiler.js +391 -440
- data/dist/ember-testing.js +1 -1
- data/dist/ember-tests.js +398 -602
- data/dist/ember-tests.prod.js +403 -634
- data/dist/ember.debug.js +857 -1089
- data/dist/ember.min.js +428 -435
- data/dist/ember.prod.js +819 -1052
- data/lib/ember/version.rb +4 -6
- data/package.json +127 -0
- metadata +6 -6
- data/VERSION +0 -1
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 2.
|
9
|
+
* @version 2.17.0-beta.4
|
10
10
|
*/
|
11
11
|
|
12
12
|
var enifed, requireModule, Ember;
|
@@ -684,6 +684,31 @@ enifed('container/tests/container_test', ['ember-babel', 'ember-utils', 'ember-m
|
|
684
684
|
assert.deepEqual(instance1.constructor, instance2.constructor);
|
685
685
|
});
|
686
686
|
|
687
|
+
QUnit.test('can properly reset cache', function (assert) {
|
688
|
+
var registry = new _container.Registry();
|
689
|
+
var container = registry.container();
|
690
|
+
|
691
|
+
var Component = (0, _internalTestHelpers.factory)();
|
692
|
+
registry.register('component:foo-bar', Component);
|
693
|
+
|
694
|
+
var factory1 = container.factoryFor('component:foo-bar');
|
695
|
+
var factory2 = container.factoryFor('component:foo-bar');
|
696
|
+
|
697
|
+
var instance1 = container.lookup('component:foo-bar');
|
698
|
+
var instance2 = container.lookup('component:foo-bar');
|
699
|
+
|
700
|
+
assert.equal(instance1, instance2);
|
701
|
+
assert.equal(factory1, factory2);
|
702
|
+
|
703
|
+
container.reset();
|
704
|
+
|
705
|
+
var factory3 = container.factoryFor('component:foo-bar');
|
706
|
+
var instance3 = container.lookup('component:foo-bar');
|
707
|
+
|
708
|
+
assert.notEqual(instance1, instance3);
|
709
|
+
assert.notEqual(factory1, factory3);
|
710
|
+
});
|
711
|
+
|
687
712
|
QUnit.test('#factoryFor created instances come with instance injections', function (assert) {
|
688
713
|
var registry = new _container.Registry();
|
689
714
|
var container = registry.container();
|
@@ -8312,7 +8337,7 @@ QUnit.test('should pass ESLint', function(assert) {
|
|
8312
8337
|
assert.ok(true, 'ember-glimmer/tests/integration/application/actions-test.js should pass ESLint\n\n');
|
8313
8338
|
});
|
8314
8339
|
|
8315
|
-
enifed('ember-glimmer/tests/integration/application/engine-test', ['ember-babel', 'ember-glimmer/tests/utils/test-case', 'ember-glimmer/tests/utils/abstract-test-case', 'ember-glimmer/tests/utils/helpers', 'ember-runtime', 'ember-glimmer', 'ember-application', 'ember-routing'], function (_emberBabel, _testCase, _abstractTestCase, _helpers, _emberRuntime, _emberGlimmer, _emberApplication, _emberRouting) {
|
8340
|
+
enifed('ember-glimmer/tests/integration/application/engine-test', ['ember-babel', 'ember-glimmer/tests/utils/test-case', 'ember-glimmer/tests/utils/abstract-test-case', 'ember-glimmer/tests/utils/helpers', 'ember-runtime', 'ember-glimmer', 'ember-application', 'ember-routing', 'ember-metal'], function (_emberBabel, _testCase, _abstractTestCase, _helpers, _emberRuntime, _emberGlimmer, _emberApplication, _emberRouting, _emberMetal) {
|
8316
8341
|
'use strict';
|
8317
8342
|
|
8318
8343
|
var _templateObject = (0, _emberBabel.taggedTemplateLiteralLoose)(['\n <h1>{{contextType}}</h1>\n {{ambiguous-curlies}}\n\n {{outlet}}\n '], ['\n <h1>{{contextType}}</h1>\n {{ambiguous-curlies}}\n\n {{outlet}}\n ']),
|
@@ -8678,8 +8703,15 @@ enifed('ember-glimmer/tests/integration/application/engine-test', ['ember-babel'
|
|
8678
8703
|
|
8679
8704
|
assert.expect(2);
|
8680
8705
|
|
8706
|
+
var errorEntered = _emberRuntime.RSVP.defer();
|
8707
|
+
|
8681
8708
|
this.setupAppAndRoutableEngine();
|
8682
8709
|
this.additionalEngineRegistrations(function () {
|
8710
|
+
this.register('route:application_error', _emberRouting.Route.extend({
|
8711
|
+
activate: function () {
|
8712
|
+
_emberMetal.run.next(errorEntered.resolve);
|
8713
|
+
}
|
8714
|
+
}));
|
8683
8715
|
this.register('template:application_error', (0, _helpers.compile)('Error! {{model.message}}'));
|
8684
8716
|
this.register('route:post', _emberRouting.Route.extend({
|
8685
8717
|
model: function () {
|
@@ -8691,6 +8723,8 @@ enifed('ember-glimmer/tests/integration/application/engine-test', ['ember-babel'
|
|
8691
8723
|
return this.visit('/').then(function () {
|
8692
8724
|
_this12.assertText('Application');
|
8693
8725
|
return _this12.transitionTo('blog.post');
|
8726
|
+
}).then(function () {
|
8727
|
+
return errorEntered.promise;
|
8694
8728
|
}).then(function () {
|
8695
8729
|
_this12.assertText('ApplicationError! Oh, noes!');
|
8696
8730
|
});
|
@@ -8701,8 +8735,15 @@ enifed('ember-glimmer/tests/integration/application/engine-test', ['ember-babel'
|
|
8701
8735
|
|
8702
8736
|
assert.expect(2);
|
8703
8737
|
|
8738
|
+
var errorEntered = _emberRuntime.RSVP.defer();
|
8739
|
+
|
8704
8740
|
this.setupAppAndRoutableEngine();
|
8705
8741
|
this.additionalEngineRegistrations(function () {
|
8742
|
+
this.register('route:error', _emberRouting.Route.extend({
|
8743
|
+
activate: function () {
|
8744
|
+
_emberMetal.run.next(errorEntered.resolve);
|
8745
|
+
}
|
8746
|
+
}));
|
8706
8747
|
this.register('template:error', (0, _helpers.compile)('Error! {{model.message}}'));
|
8707
8748
|
this.register('route:post', _emberRouting.Route.extend({
|
8708
8749
|
model: function () {
|
@@ -8714,6 +8755,8 @@ enifed('ember-glimmer/tests/integration/application/engine-test', ['ember-babel'
|
|
8714
8755
|
return this.visit('/').then(function () {
|
8715
8756
|
_this13.assertText('Application');
|
8716
8757
|
return _this13.transitionTo('blog.post');
|
8758
|
+
}).then(function () {
|
8759
|
+
return errorEntered.promise;
|
8717
8760
|
}).then(function () {
|
8718
8761
|
_this13.assertText('ApplicationEngineError! Oh, noes!');
|
8719
8762
|
});
|
@@ -8724,8 +8767,15 @@ enifed('ember-glimmer/tests/integration/application/engine-test', ['ember-babel'
|
|
8724
8767
|
|
8725
8768
|
assert.expect(2);
|
8726
8769
|
|
8770
|
+
var errorEntered = _emberRuntime.RSVP.defer();
|
8771
|
+
|
8727
8772
|
this.setupAppAndRoutableEngine();
|
8728
8773
|
this.additionalEngineRegistrations(function () {
|
8774
|
+
this.register('route:post_error', _emberRouting.Route.extend({
|
8775
|
+
activate: function () {
|
8776
|
+
_emberMetal.run.next(errorEntered.resolve);
|
8777
|
+
}
|
8778
|
+
}));
|
8729
8779
|
this.register('template:post_error', (0, _helpers.compile)('Error! {{model.message}}'));
|
8730
8780
|
this.register('route:post', _emberRouting.Route.extend({
|
8731
8781
|
model: function () {
|
@@ -8737,6 +8787,8 @@ enifed('ember-glimmer/tests/integration/application/engine-test', ['ember-babel'
|
|
8737
8787
|
return this.visit('/').then(function () {
|
8738
8788
|
_this14.assertText('Application');
|
8739
8789
|
return _this14.transitionTo('blog.post');
|
8790
|
+
}).then(function () {
|
8791
|
+
return errorEntered.promise;
|
8740
8792
|
}).then(function () {
|
8741
8793
|
_this14.assertText('ApplicationEngineError! Oh, noes!');
|
8742
8794
|
});
|
@@ -8747,8 +8799,15 @@ enifed('ember-glimmer/tests/integration/application/engine-test', ['ember-babel'
|
|
8747
8799
|
|
8748
8800
|
assert.expect(2);
|
8749
8801
|
|
8802
|
+
var errorEntered = _emberRuntime.RSVP.defer();
|
8803
|
+
|
8750
8804
|
this.setupAppAndRoutableEngine();
|
8751
8805
|
this.additionalEngineRegistrations(function () {
|
8806
|
+
this.register('route:post.error', _emberRouting.Route.extend({
|
8807
|
+
activate: function () {
|
8808
|
+
_emberMetal.run.next(errorEntered.resolve);
|
8809
|
+
}
|
8810
|
+
}));
|
8752
8811
|
this.register('template:post.error', (0, _helpers.compile)('Error! {{model.message}}'));
|
8753
8812
|
this.register('route:post.comments', _emberRouting.Route.extend({
|
8754
8813
|
model: function () {
|
@@ -8760,6 +8819,8 @@ enifed('ember-glimmer/tests/integration/application/engine-test', ['ember-babel'
|
|
8760
8819
|
return this.visit('/').then(function () {
|
8761
8820
|
_this15.assertText('Application');
|
8762
8821
|
return _this15.transitionTo('blog.post.comments');
|
8822
|
+
}).then(function () {
|
8823
|
+
return errorEntered.promise;
|
8763
8824
|
}).then(function () {
|
8764
8825
|
_this15.assertText('ApplicationEngineError! Oh, noes!');
|
8765
8826
|
});
|
@@ -8769,18 +8830,23 @@ enifed('ember-glimmer/tests/integration/application/engine-test', ['ember-babel'
|
|
8769
8830
|
var _this16 = this;
|
8770
8831
|
|
8771
8832
|
assert.expect(3);
|
8833
|
+
var done = assert.async();
|
8772
8834
|
|
8773
|
-
var
|
8835
|
+
var loadingEntered = _emberRuntime.RSVP.defer();
|
8836
|
+
var resolveLoading = _emberRuntime.RSVP.defer();
|
8774
8837
|
|
8775
8838
|
this.setupAppAndRoutableEngine();
|
8776
8839
|
this.additionalEngineRegistrations(function () {
|
8840
|
+
this.register('route:application_loading', _emberRouting.Route.extend({
|
8841
|
+
activate: function () {
|
8842
|
+
_emberMetal.run.next(loadingEntered.resolve);
|
8843
|
+
}
|
8844
|
+
}));
|
8777
8845
|
this.register('template:application_loading', (0, _helpers.compile)('Loading'));
|
8778
8846
|
this.register('template:post', (0, _helpers.compile)('Post'));
|
8779
8847
|
this.register('route:post', _emberRouting.Route.extend({
|
8780
8848
|
model: function () {
|
8781
|
-
return
|
8782
|
-
resolveLoading = resolve;
|
8783
|
-
});
|
8849
|
+
return resolveLoading.promise;
|
8784
8850
|
}
|
8785
8851
|
}));
|
8786
8852
|
});
|
@@ -8789,16 +8855,17 @@ enifed('ember-glimmer/tests/integration/application/engine-test', ['ember-babel'
|
|
8789
8855
|
_this16.assertText('Application');
|
8790
8856
|
var transition = _this16.transitionTo('blog.post');
|
8791
8857
|
|
8792
|
-
|
8858
|
+
loadingEntered.promise.then(function () {
|
8793
8859
|
_this16.assertText('ApplicationLoading');
|
8794
|
-
resolveLoading();
|
8795
|
-
});
|
8860
|
+
resolveLoading.resolve();
|
8796
8861
|
|
8797
|
-
return transition.then(function () {
|
8798
8862
|
_this16.runTaskNext(function () {
|
8799
|
-
|
8863
|
+
_this16.assertText('ApplicationEnginePost');
|
8864
|
+
done();
|
8800
8865
|
});
|
8801
8866
|
});
|
8867
|
+
|
8868
|
+
return transition;
|
8802
8869
|
});
|
8803
8870
|
};
|
8804
8871
|
|
@@ -8806,18 +8873,23 @@ enifed('ember-glimmer/tests/integration/application/engine-test', ['ember-babel'
|
|
8806
8873
|
var _this17 = this;
|
8807
8874
|
|
8808
8875
|
assert.expect(3);
|
8876
|
+
var done = assert.async();
|
8809
8877
|
|
8810
|
-
var
|
8878
|
+
var loadingEntered = _emberRuntime.RSVP.defer();
|
8879
|
+
var resolveLoading = _emberRuntime.RSVP.defer();
|
8811
8880
|
|
8812
8881
|
this.setupAppAndRoutableEngine();
|
8813
8882
|
this.additionalEngineRegistrations(function () {
|
8883
|
+
this.register('route:loading', _emberRouting.Route.extend({
|
8884
|
+
activate: function () {
|
8885
|
+
_emberMetal.run.next(loadingEntered.resolve);
|
8886
|
+
}
|
8887
|
+
}));
|
8814
8888
|
this.register('template:loading', (0, _helpers.compile)('Loading'));
|
8815
8889
|
this.register('template:post', (0, _helpers.compile)('Post'));
|
8816
8890
|
this.register('route:post', _emberRouting.Route.extend({
|
8817
8891
|
model: function () {
|
8818
|
-
return
|
8819
|
-
resolveLoading = resolve;
|
8820
|
-
});
|
8892
|
+
return resolveLoading.promise;
|
8821
8893
|
}
|
8822
8894
|
}));
|
8823
8895
|
});
|
@@ -8826,16 +8898,17 @@ enifed('ember-glimmer/tests/integration/application/engine-test', ['ember-babel'
|
|
8826
8898
|
_this17.assertText('Application');
|
8827
8899
|
var transition = _this17.transitionTo('blog.post');
|
8828
8900
|
|
8829
|
-
|
8901
|
+
loadingEntered.promise.then(function () {
|
8830
8902
|
_this17.assertText('ApplicationEngineLoading');
|
8831
|
-
resolveLoading();
|
8832
|
-
});
|
8903
|
+
resolveLoading.resolve();
|
8833
8904
|
|
8834
|
-
return transition.then(function () {
|
8835
8905
|
_this17.runTaskNext(function () {
|
8836
|
-
|
8906
|
+
_this17.assertText('ApplicationEnginePost');
|
8907
|
+
done();
|
8837
8908
|
});
|
8838
8909
|
});
|
8910
|
+
|
8911
|
+
return transition;
|
8839
8912
|
});
|
8840
8913
|
};
|
8841
8914
|
|
@@ -8882,20 +8955,25 @@ enifed('ember-glimmer/tests/integration/application/engine-test', ['ember-babel'
|
|
8882
8955
|
var _this19 = this;
|
8883
8956
|
|
8884
8957
|
assert.expect(3);
|
8958
|
+
var done = assert.async();
|
8885
8959
|
|
8886
|
-
var
|
8960
|
+
var loadingEntered = _emberRuntime.RSVP.defer();
|
8961
|
+
var resolveLoading = _emberRuntime.RSVP.defer();
|
8887
8962
|
|
8888
8963
|
this.setupAppAndRoutableEngine();
|
8889
8964
|
this.additionalEngineRegistrations(function () {
|
8890
8965
|
this.register('template:post', (0, _helpers.compile)('{{outlet}}'));
|
8891
8966
|
this.register('template:post.comments', (0, _helpers.compile)('Comments'));
|
8967
|
+
this.register('route:post.loading', _emberRouting.Route.extend({
|
8968
|
+
activate: function () {
|
8969
|
+
_emberMetal.run.next(loadingEntered.resolve);
|
8970
|
+
}
|
8971
|
+
}));
|
8892
8972
|
this.register('template:post.loading', (0, _helpers.compile)('Loading'));
|
8893
8973
|
this.register('template:post.likes', (0, _helpers.compile)('Likes'));
|
8894
8974
|
this.register('route:post.likes', _emberRouting.Route.extend({
|
8895
8975
|
model: function () {
|
8896
|
-
return
|
8897
|
-
resolveLoading = resolve;
|
8898
|
-
});
|
8976
|
+
return resolveLoading.promise;
|
8899
8977
|
}
|
8900
8978
|
}));
|
8901
8979
|
});
|
@@ -8904,16 +8982,17 @@ enifed('ember-glimmer/tests/integration/application/engine-test', ['ember-babel'
|
|
8904
8982
|
_this19.assertText('ApplicationEngineComments');
|
8905
8983
|
var transition = _this19.transitionTo('blog.post.likes');
|
8906
8984
|
|
8907
|
-
|
8985
|
+
loadingEntered.promise.then(function () {
|
8908
8986
|
_this19.assertText('ApplicationEngineLoading');
|
8909
|
-
resolveLoading();
|
8910
|
-
});
|
8987
|
+
resolveLoading.resolve();
|
8911
8988
|
|
8912
|
-
return transition.then(function () {
|
8913
8989
|
_this19.runTaskNext(function () {
|
8914
|
-
|
8990
|
+
_this19.assertText('ApplicationEngineLikes');
|
8991
|
+
done();
|
8915
8992
|
});
|
8916
8993
|
});
|
8994
|
+
|
8995
|
+
return transition;
|
8917
8996
|
});
|
8918
8997
|
};
|
8919
8998
|
|
@@ -8958,6 +9037,77 @@ enifed('ember-glimmer/tests/integration/application/engine-test', ['ember-babel'
|
|
8958
9037
|
});
|
8959
9038
|
};
|
8960
9039
|
|
9040
|
+
_class.prototype['@test visit() routable engine which errors on init'] = function testVisitRoutableEngineWhichErrorsOnInit(assert) {
|
9041
|
+
var _this22 = this;
|
9042
|
+
|
9043
|
+
assert.expect(1);
|
9044
|
+
|
9045
|
+
var hooks = [];
|
9046
|
+
|
9047
|
+
this.additionalEngineRegistrations(function () {
|
9048
|
+
this.register('route:application', _emberRouting.Route.extend({
|
9049
|
+
init: function () {
|
9050
|
+
throw new Error('Whoops! Something went wrong...');
|
9051
|
+
}
|
9052
|
+
}));
|
9053
|
+
});
|
9054
|
+
|
9055
|
+
this.setupAppAndRoutableEngine(hooks);
|
9056
|
+
|
9057
|
+
return this.visit('/', { shouldRender: true }).then(function () {
|
9058
|
+
return _this22.visit('/blog');
|
9059
|
+
}).catch(function (error) {
|
9060
|
+
assert.equal(error.message, 'Whoops! Something went wrong...');
|
9061
|
+
});
|
9062
|
+
};
|
9063
|
+
|
9064
|
+
(0, _emberBabel.createClass)(_class, [{
|
9065
|
+
key: 'routerOptions',
|
9066
|
+
get: function () {
|
9067
|
+
var assert = this.assert;
|
9068
|
+
|
9069
|
+
return {
|
9070
|
+
location: 'none',
|
9071
|
+
|
9072
|
+
_getHandlerFunction: function () {
|
9073
|
+
var _this23 = this;
|
9074
|
+
|
9075
|
+
var syncHandler = this._super.apply(this, arguments);
|
9076
|
+
this._enginePromises = Object.create(null);
|
9077
|
+
this._resolvedEngines = Object.create(null);
|
9078
|
+
|
9079
|
+
return function (name) {
|
9080
|
+
var engineInfo = _this23._engineInfoByRoute[name];
|
9081
|
+
if (!engineInfo) {
|
9082
|
+
return syncHandler(name);
|
9083
|
+
}
|
9084
|
+
|
9085
|
+
var engineName = engineInfo.name;
|
9086
|
+
if (_this23._resolvedEngines[engineName]) {
|
9087
|
+
return syncHandler(name);
|
9088
|
+
}
|
9089
|
+
|
9090
|
+
var enginePromise = _this23._enginePromises[engineName];
|
9091
|
+
|
9092
|
+
if (!enginePromise) {
|
9093
|
+
enginePromise = new _emberRuntime.RSVP.Promise(function (resolve) {
|
9094
|
+
setTimeout(function () {
|
9095
|
+
_this23._resolvedEngines[engineName] = true;
|
9096
|
+
|
9097
|
+
resolve();
|
9098
|
+
}, 1);
|
9099
|
+
});
|
9100
|
+
_this23._enginePromises[engineName] = enginePromise;
|
9101
|
+
}
|
9102
|
+
|
9103
|
+
return enginePromise.then(function () {
|
9104
|
+
return syncHandler(name);
|
9105
|
+
});
|
9106
|
+
};
|
9107
|
+
}
|
9108
|
+
};
|
9109
|
+
}
|
9110
|
+
}]);
|
8961
9111
|
return _class;
|
8962
9112
|
}(_testCase.ApplicationTest));
|
8963
9113
|
});
|
@@ -17476,109 +17626,6 @@ QUnit.test('should pass ESLint', function(assert) {
|
|
17476
17626
|
assert.ok(true, 'ember-glimmer/tests/integration/components/dynamic-components-test.js should pass ESLint\n\n');
|
17477
17627
|
});
|
17478
17628
|
|
17479
|
-
enifed('ember-glimmer/tests/integration/components/error-handling-test', ['ember-babel', 'ember-metal', 'ember-glimmer/tests/utils/helpers', 'ember-glimmer/tests/utils/test-case'], function (_emberBabel, _emberMetal, _helpers, _testCase) {
|
17480
|
-
'use strict';
|
17481
|
-
|
17482
|
-
(0, _testCase.moduleFor)('Errors thrown during render', function (_RenderingTest) {
|
17483
|
-
(0, _emberBabel.inherits)(_class, _RenderingTest);
|
17484
|
-
|
17485
|
-
function _class() {
|
17486
|
-
(0, _emberBabel.classCallCheck)(this, _class);
|
17487
|
-
return (0, _emberBabel.possibleConstructorReturn)(this, _RenderingTest.apply(this, arguments));
|
17488
|
-
}
|
17489
|
-
|
17490
|
-
_class.prototype['@test it can recover resets the transaction when an error is thrown during initial render'] = function testItCanRecoverResetsTheTransactionWhenAnErrorIsThrownDuringInitialRender(assert) {
|
17491
|
-
var _this2 = this;
|
17492
|
-
|
17493
|
-
var shouldThrow = true;
|
17494
|
-
var FooBarComponent = _helpers.Component.extend({
|
17495
|
-
init: function () {
|
17496
|
-
this._super.apply(this, arguments);
|
17497
|
-
if (shouldThrow) {
|
17498
|
-
throw new Error('silly mistake in init!');
|
17499
|
-
}
|
17500
|
-
}
|
17501
|
-
});
|
17502
|
-
|
17503
|
-
this.registerComponent('foo-bar', { ComponentClass: FooBarComponent, template: 'hello' });
|
17504
|
-
|
17505
|
-
assert.throws(function () {
|
17506
|
-
_this2.render('{{#if switch}}{{#foo-bar}}{{foo-bar}}{{/foo-bar}}{{/if}}', { switch: true });
|
17507
|
-
}, /silly mistake in init/);
|
17508
|
-
|
17509
|
-
assert.equal(this.env.inTransaction, false, 'should not be in a transaction even though an error was thrown');
|
17510
|
-
|
17511
|
-
this.assertText('');
|
17512
|
-
|
17513
|
-
this.runTask(function () {
|
17514
|
-
return (0, _emberMetal.set)(_this2.context, 'switch', false);
|
17515
|
-
});
|
17516
|
-
|
17517
|
-
shouldThrow = false;
|
17518
|
-
|
17519
|
-
this.runTask(function () {
|
17520
|
-
return (0, _emberMetal.set)(_this2.context, 'switch', true);
|
17521
|
-
});
|
17522
|
-
|
17523
|
-
this.assertText('hello');
|
17524
|
-
};
|
17525
|
-
|
17526
|
-
_class.prototype['@test it can recover resets the transaction when an error is thrown during rerender'] = function testItCanRecoverResetsTheTransactionWhenAnErrorIsThrownDuringRerender(assert) {
|
17527
|
-
var _this3 = this;
|
17528
|
-
|
17529
|
-
var shouldThrow = false;
|
17530
|
-
var FooBarComponent = _helpers.Component.extend({
|
17531
|
-
init: function () {
|
17532
|
-
this._super.apply(this, arguments);
|
17533
|
-
if (shouldThrow) {
|
17534
|
-
throw new Error('silly mistake in init!');
|
17535
|
-
}
|
17536
|
-
}
|
17537
|
-
});
|
17538
|
-
|
17539
|
-
this.registerComponent('foo-bar', { ComponentClass: FooBarComponent, template: 'hello' });
|
17540
|
-
|
17541
|
-
this.render('{{#if switch}}{{#foo-bar}}{{foo-bar}}{{/foo-bar}}{{/if}}', { switch: true });
|
17542
|
-
|
17543
|
-
this.assertText('hello');
|
17544
|
-
|
17545
|
-
this.runTask(function () {
|
17546
|
-
return (0, _emberMetal.set)(_this3.context, 'switch', false);
|
17547
|
-
});
|
17548
|
-
|
17549
|
-
shouldThrow = true;
|
17550
|
-
|
17551
|
-
assert.throws(function () {
|
17552
|
-
_this3.runTask(function () {
|
17553
|
-
return (0, _emberMetal.set)(_this3.context, 'switch', true);
|
17554
|
-
});
|
17555
|
-
}, /silly mistake in init/);
|
17556
|
-
|
17557
|
-
assert.equal(this.env.inTransaction, false, 'should not be in a transaction even though an error was thrown');
|
17558
|
-
|
17559
|
-
this.assertText('');
|
17560
|
-
|
17561
|
-
this.runTask(function () {
|
17562
|
-
return (0, _emberMetal.set)(_this3.context, 'switch', false);
|
17563
|
-
});
|
17564
|
-
shouldThrow = false;
|
17565
|
-
|
17566
|
-
this.runTask(function () {
|
17567
|
-
return (0, _emberMetal.set)(_this3.context, 'switch', true);
|
17568
|
-
});
|
17569
|
-
|
17570
|
-
this.assertText('hello');
|
17571
|
-
};
|
17572
|
-
|
17573
|
-
return _class;
|
17574
|
-
}(_testCase.RenderingTest));
|
17575
|
-
});
|
17576
|
-
QUnit.module('ESLint | ember-glimmer/tests/integration/components/error-handling-test.js');
|
17577
|
-
QUnit.test('should pass ESLint', function(assert) {
|
17578
|
-
assert.expect(1);
|
17579
|
-
assert.ok(true, 'ember-glimmer/tests/integration/components/error-handling-test.js should pass ESLint\n\n');
|
17580
|
-
});
|
17581
|
-
|
17582
17629
|
enifed('ember-glimmer/tests/integration/components/fragment-components-test', ['ember-babel', 'ember-glimmer/tests/utils/test-case', 'ember-glimmer/tests/utils/abstract-test-case', 'ember-glimmer/tests/utils/helpers', 'ember-metal'], function (_emberBabel, _testCase, _abstractTestCase, _helpers, _emberMetal) {
|
17583
17630
|
'use strict';
|
17584
17631
|
|
@@ -30090,16 +30137,10 @@ enifed('ember-glimmer/tests/integration/helpers/partial-test', ['ember-babel', '
|
|
30090
30137
|
_templateObject2 = (0, _emberBabel.taggedTemplateLiteralLoose)(['\n {{#with model as |item|}}\n {{item.name}}: {{partial \'show-id\'}}\n {{/with}}'], ['\n {{#with model as |item|}}\n {{item.name}}: {{partial \'show-id\'}}\n {{/with}}']),
|
30091
30138
|
_templateObject3 = (0, _emberBabel.taggedTemplateLiteralLoose)(['\n {{#each items as |item|}}\n {{item.id}}: {{partial \'show-item\'}} |\n {{/each}}'], ['\n {{#each items as |item|}}\n {{item.id}}: {{partial \'show-item\'}} |\n {{/each}}']),
|
30092
30139
|
_templateObject4 = (0, _emberBabel.taggedTemplateLiteralLoose)(['\n {{#each items as |item|}}\n {{item}}: {{partial \'show-item\'}} |\n {{/each}}'], ['\n {{#each items as |item|}}\n {{item}}: {{partial \'show-item\'}} |\n {{/each}}']),
|
30093
|
-
_templateObject5 = (0, _emberBabel.taggedTemplateLiteralLoose)(['\n
|
30094
|
-
_templateObject6 = (0, _emberBabel.taggedTemplateLiteralLoose)(['\n {{#
|
30095
|
-
_templateObject7 = (0, _emberBabel.taggedTemplateLiteralLoose)(['\n {{#
|
30096
|
-
_templateObject8 = (0, _emberBabel.taggedTemplateLiteralLoose)(['\n {{#
|
30097
|
-
_templateObject9 = (0, _emberBabel.taggedTemplateLiteralLoose)(['\n {{#with \'Sarah\' as |person4|}}\n Hi {{person1}} (aged {{age}}), {{person2}}, {{person3}} and {{person4}}.\n {{/with}}\n '], ['\n {{#with \'Sarah\' as |person4|}}\n Hi {{person1}} (aged {{age}}), {{person2}}, {{person3}} and {{person4}}.\n {{/with}}\n ']),
|
30098
|
-
_templateObject10 = (0, _emberBabel.taggedTemplateLiteralLoose)(['\n {{#with \'Sophie\' as |person1|}}\n Hi {{person1}} (aged {{age}}). {{partial \'person2-partial\'}}\n {{/with}}'], ['\n {{#with \'Sophie\' as |person1|}}\n Hi {{person1}} (aged {{age}}). {{partial \'person2-partial\'}}\n {{/with}}']),
|
30099
|
-
_templateObject11 = (0, _emberBabel.taggedTemplateLiteralLoose)(['\n {{#each model.items as |template i|}}\n {{model.type}}: {{partial template}}\n {{/each}}'], ['\n {{#each model.items as |template i|}}\n {{model.type}}: {{partial template}}\n {{/each}}']),
|
30100
|
-
_templateObject12 = (0, _emberBabel.taggedTemplateLiteralLoose)(['\n {{#with item.thing as |t|}}\n {{partial t}}\n {{else}}\n Nothing!\n {{/with}}'], ['\n {{#with item.thing as |t|}}\n {{partial t}}\n {{else}}\n Nothing!\n {{/with}}']),
|
30101
|
-
_templateObject13 = (0, _emberBabel.taggedTemplateLiteralLoose)(['\n {{#outer.inner as |inner|}}\n inner.name: {{inner.name}}\n {{/outer.inner}}\n '], ['\n {{#outer.inner as |inner|}}\n inner.name: {{inner.name}}\n {{/outer.inner}}\n ']),
|
30102
|
-
_templateObject14 = (0, _emberBabel.taggedTemplateLiteralLoose)(['\n {{#outer-component name=name as |outer|}}\n {{partial \'some-partial\'}}\n {{/outer-component}}'], ['\n {{#outer-component name=name as |outer|}}\n {{partial \'some-partial\'}}\n {{/outer-component}}']);
|
30140
|
+
_templateObject5 = (0, _emberBabel.taggedTemplateLiteralLoose)(['\n {{#each model.items as |template i|}}\n {{model.type}}: {{partial template}}\n {{/each}}'], ['\n {{#each model.items as |template i|}}\n {{model.type}}: {{partial template}}\n {{/each}}']),
|
30141
|
+
_templateObject6 = (0, _emberBabel.taggedTemplateLiteralLoose)(['\n {{#with item.thing as |t|}}\n {{partial t}}\n {{else}}\n Nothing!\n {{/with}}'], ['\n {{#with item.thing as |t|}}\n {{partial t}}\n {{else}}\n Nothing!\n {{/with}}']),
|
30142
|
+
_templateObject7 = (0, _emberBabel.taggedTemplateLiteralLoose)(['\n {{#outer.inner as |inner|}}\n inner.name: {{inner.name}}\n {{/outer.inner}}\n '], ['\n {{#outer.inner as |inner|}}\n inner.name: {{inner.name}}\n {{/outer.inner}}\n ']),
|
30143
|
+
_templateObject8 = (0, _emberBabel.taggedTemplateLiteralLoose)(['\n {{#outer-component name=name as |outer|}}\n {{partial \'some-partial\'}}\n {{/outer-component}}'], ['\n {{#outer-component name=name as |outer|}}\n {{partial \'some-partial\'}}\n {{/outer-component}}']);
|
30103
30144
|
|
30104
30145
|
(0, _testCase.moduleFor)('Helpers test: {{partial}}', function (_RenderingTest) {
|
30105
30146
|
(0, _emberBabel.inherits)(_class, _RenderingTest);
|
@@ -30305,69 +30346,13 @@ enifed('ember-glimmer/tests/integration/helpers/partial-test', ['ember-babel', '
|
|
30305
30346
|
this.assertText('apple: apple |: |orange: orange |banana: banana |');
|
30306
30347
|
};
|
30307
30348
|
|
30308
|
-
_class.prototype['@test nested partials using data from {{#each}}'] = function testNestedPartialsUsingDataFromEach() {
|
30309
|
-
var _this8 = this;
|
30310
|
-
|
30311
|
-
this.registerPartial('_outer-partial', (0, _abstractTestCase.strip)(_templateObject5));
|
30312
|
-
|
30313
|
-
this.registerPartial('inner-partial', '[inner: {{name}}]');
|
30314
|
-
|
30315
|
-
this.render((0, _abstractTestCase.strip)(_templateObject6), {
|
30316
|
-
names: (0, _emberRuntime.A)(['Alex', 'Ben'])
|
30317
|
-
});
|
30318
|
-
|
30319
|
-
this.assertStableRerender();
|
30320
|
-
|
30321
|
-
this.assertText('0: [outer: Alex] [inner: Alex]1: [outer: Ben] [inner: Ben]');
|
30322
|
-
|
30323
|
-
this.runTask(function () {
|
30324
|
-
return _this8.context.names.pushObject('Sophie');
|
30325
|
-
});
|
30326
|
-
|
30327
|
-
this.assertText('0: [outer: Alex] [inner: Alex]1: [outer: Ben] [inner: Ben]2: [outer: Sophie] [inner: Sophie]');
|
30328
|
-
|
30329
|
-
this.runTask(function () {
|
30330
|
-
return (0, _emberMetal.set)(_this8.context, 'names', (0, _emberRuntime.A)(['Alex', 'Ben']));
|
30331
|
-
});
|
30332
|
-
|
30333
|
-
this.assertText('0: [outer: Alex] [inner: Alex]1: [outer: Ben] [inner: Ben]');
|
30334
|
-
};
|
30335
|
-
|
30336
|
-
_class.prototype['@test nested partials within nested `{{#with}}` blocks'] = function testNestedPartialsWithinNestedWithBlocks() {
|
30337
|
-
var _this9 = this;
|
30338
|
-
|
30339
|
-
this.registerPartial('_person2-partial', (0, _abstractTestCase.strip)(_templateObject7));
|
30340
|
-
|
30341
|
-
this.registerPartial('_person3-partial', (0, _abstractTestCase.strip)(_templateObject8));
|
30342
|
-
|
30343
|
-
this.registerPartial('_person4-partial', (0, _abstractTestCase.strip)(_templateObject9));
|
30344
|
-
|
30345
|
-
this.render((0, _abstractTestCase.strip)(_templateObject10), { age: 0 });
|
30346
|
-
|
30347
|
-
this.assertStableRerender();
|
30348
|
-
|
30349
|
-
this.assertText('Hi Sophie (aged 0). Hi Sophie (aged 0) and Ben. Hi Sophie (aged 0), Ben and Alex. Hi Sophie (aged 0), Ben, Alex and Sarah.');
|
30350
|
-
|
30351
|
-
this.runTask(function () {
|
30352
|
-
return (0, _emberMetal.set)(_this9.context, 'age', 1);
|
30353
|
-
});
|
30354
|
-
|
30355
|
-
this.assertText('Hi Sophie (aged 1). Hi Sophie (aged 1) and Ben. Hi Sophie (aged 1), Ben and Alex. Hi Sophie (aged 1), Ben, Alex and Sarah.');
|
30356
|
-
|
30357
|
-
this.runTask(function () {
|
30358
|
-
return (0, _emberMetal.set)(_this9.context, 'age', 0);
|
30359
|
-
});
|
30360
|
-
|
30361
|
-
this.assertText('Hi Sophie (aged 0). Hi Sophie (aged 0) and Ben. Hi Sophie (aged 0), Ben and Alex. Hi Sophie (aged 0), Ben, Alex and Sarah.');
|
30362
|
-
};
|
30363
|
-
|
30364
30349
|
_class.prototype['@test dynamic partials in {{#each}}'] = function testDynamicPartialsInEach() {
|
30365
|
-
var
|
30350
|
+
var _this8 = this;
|
30366
30351
|
|
30367
30352
|
this.registerPartial('_odd', 'ODD{{i}}');
|
30368
30353
|
this.registerPartial('_even', 'EVEN{{i}}');
|
30369
30354
|
|
30370
|
-
this.render((0, _abstractTestCase.strip)(
|
30355
|
+
this.render((0, _abstractTestCase.strip)(_templateObject5), {
|
30371
30356
|
model: {
|
30372
30357
|
items: ['even', 'odd', 'even', 'odd'],
|
30373
30358
|
type: 'number'
|
@@ -30379,13 +30364,13 @@ enifed('ember-glimmer/tests/integration/helpers/partial-test', ['ember-babel', '
|
|
30379
30364
|
this.assertText('number: EVEN0number: ODD1number: EVEN2number: ODD3');
|
30380
30365
|
|
30381
30366
|
this.runTask(function () {
|
30382
|
-
return (0, _emberMetal.set)(
|
30367
|
+
return (0, _emberMetal.set)(_this8.context, 'model.type', 'integer');
|
30383
30368
|
});
|
30384
30369
|
|
30385
30370
|
this.assertText('integer: EVEN0integer: ODD1integer: EVEN2integer: ODD3');
|
30386
30371
|
|
30387
30372
|
this.runTask(function () {
|
30388
|
-
return (0, _emberMetal.set)(
|
30373
|
+
return (0, _emberMetal.set)(_this8.context, 'model', {
|
30389
30374
|
items: ['even', 'odd', 'even', 'odd'],
|
30390
30375
|
type: 'number'
|
30391
30376
|
});
|
@@ -30395,11 +30380,11 @@ enifed('ember-glimmer/tests/integration/helpers/partial-test', ['ember-babel', '
|
|
30395
30380
|
};
|
30396
30381
|
|
30397
30382
|
_class.prototype['@test dynamic partials in {{#with}}'] = function testDynamicPartialsInWith() {
|
30398
|
-
var
|
30383
|
+
var _this9 = this;
|
30399
30384
|
|
30400
30385
|
this.registerPartial('_thing', '{{t}}');
|
30401
30386
|
|
30402
|
-
this.render((0, _abstractTestCase.strip)(
|
30387
|
+
this.render((0, _abstractTestCase.strip)(_templateObject6), {
|
30403
30388
|
item: { thing: false }
|
30404
30389
|
});
|
30405
30390
|
|
@@ -30408,20 +30393,20 @@ enifed('ember-glimmer/tests/integration/helpers/partial-test', ['ember-babel', '
|
|
30408
30393
|
this.assertText('Nothing!');
|
30409
30394
|
|
30410
30395
|
this.runTask(function () {
|
30411
|
-
return (0, _emberMetal.set)(
|
30396
|
+
return (0, _emberMetal.set)(_this9.context, 'item.thing', 'thing');
|
30412
30397
|
});
|
30413
30398
|
|
30414
30399
|
this.assertText('thing');
|
30415
30400
|
|
30416
30401
|
this.runTask(function () {
|
30417
|
-
return (0, _emberMetal.set)(
|
30402
|
+
return (0, _emberMetal.set)(_this9.context, 'item', { thing: false });
|
30418
30403
|
});
|
30419
30404
|
|
30420
30405
|
this.assertText('Nothing!');
|
30421
30406
|
};
|
30422
30407
|
|
30423
30408
|
_class.prototype['@test partials which contain contextual components'] = function testPartialsWhichContainContextualComponents() {
|
30424
|
-
var
|
30409
|
+
var _this10 = this;
|
30425
30410
|
|
30426
30411
|
this.registerComponent('outer-component', {
|
30427
30412
|
template: '{{yield (hash inner=(component "inner-component" name=name))}}'
|
@@ -30431,22 +30416,22 @@ enifed('ember-glimmer/tests/integration/helpers/partial-test', ['ember-babel', '
|
|
30431
30416
|
template: '{{yield (hash name=name)}}'
|
30432
30417
|
});
|
30433
30418
|
|
30434
|
-
this.registerPartial('_some-partial', (0, _abstractTestCase.strip)(
|
30419
|
+
this.registerPartial('_some-partial', (0, _abstractTestCase.strip)(_templateObject7));
|
30435
30420
|
|
30436
|
-
this.render((0, _abstractTestCase.strip)(
|
30421
|
+
this.render((0, _abstractTestCase.strip)(_templateObject8), { name: 'Sophie' });
|
30437
30422
|
|
30438
30423
|
this.assertStableRerender();
|
30439
30424
|
|
30440
30425
|
this.assertText('inner.name: Sophie');
|
30441
30426
|
|
30442
30427
|
this.runTask(function () {
|
30443
|
-
return (0, _emberMetal.set)(
|
30428
|
+
return (0, _emberMetal.set)(_this10.context, 'name', 'Ben');
|
30444
30429
|
});
|
30445
30430
|
|
30446
30431
|
this.assertText('inner.name: Ben');
|
30447
30432
|
|
30448
30433
|
this.runTask(function () {
|
30449
|
-
return (0, _emberMetal.set)(
|
30434
|
+
return (0, _emberMetal.set)(_this10.context, 'name', 'Sophie');
|
30450
30435
|
});
|
30451
30436
|
|
30452
30437
|
this.assertText('inner.name: Sophie');
|
@@ -42302,19 +42287,19 @@ enifed('ember-metal/tests/map_test', ['ember-metal'], function (_emberMetal) {
|
|
42302
42287
|
});
|
42303
42288
|
|
42304
42289
|
QUnit.test('forEach without proper callback', function () {
|
42305
|
-
|
42290
|
+
expectAssertion(function () {
|
42306
42291
|
map.forEach();
|
42307
42292
|
}, '[object Undefined] is not a function');
|
42308
42293
|
|
42309
|
-
|
42294
|
+
expectAssertion(function () {
|
42310
42295
|
map.forEach(undefined);
|
42311
42296
|
}, '[object Undefined] is not a function');
|
42312
42297
|
|
42313
|
-
|
42298
|
+
expectAssertion(function () {
|
42314
42299
|
map.forEach(1);
|
42315
42300
|
}, '[object Number] is not a function');
|
42316
42301
|
|
42317
|
-
|
42302
|
+
expectAssertion(function () {
|
42318
42303
|
map.forEach({});
|
42319
42304
|
}, '[object Object] is not a function');
|
42320
42305
|
|
@@ -42323,7 +42308,7 @@ enifed('ember-metal/tests/map_test', ['ember-metal'], function (_emberMetal) {
|
|
42323
42308
|
});
|
42324
42309
|
// ensure the error happens even if no data is present
|
42325
42310
|
equal(map.size, 0);
|
42326
|
-
|
42311
|
+
expectAssertion(function () {
|
42327
42312
|
map.forEach({});
|
42328
42313
|
}, '[object Object] is not a function');
|
42329
42314
|
});
|
@@ -42535,13 +42520,6 @@ enifed('ember-metal/tests/map_test', ['ember-metal'], function (_emberMetal) {
|
|
42535
42520
|
equal(map.constructor, _emberMetal.Map);
|
42536
42521
|
});
|
42537
42522
|
|
42538
|
-
QUnit.test('Map() without `new`', function () {
|
42539
|
-
QUnit.throws(function () {
|
42540
|
-
// jshint newcap:false
|
42541
|
-
(0, _emberMetal.Map)();
|
42542
|
-
}, /Constructor Map requires 'new'/);
|
42543
|
-
});
|
42544
|
-
|
42545
42523
|
QUnit.test('MapWithDefault.prototype.constructor', function () {
|
42546
42524
|
var map = new _emberMetal.MapWithDefault({
|
42547
42525
|
defaultValue: function (key) {
|
@@ -42590,13 +42568,6 @@ enifed('ember-metal/tests/map_test', ['ember-metal'], function (_emberMetal) {
|
|
42590
42568
|
}
|
42591
42569
|
});
|
42592
42570
|
|
42593
|
-
QUnit.test('OrderedSet() without `new`', function () {
|
42594
|
-
QUnit.throws(function () {
|
42595
|
-
// jshint newcap:false
|
42596
|
-
(0, _emberMetal.OrderedSet)();
|
42597
|
-
}, /Constructor OrderedSet requires 'new'/);
|
42598
|
-
});
|
42599
|
-
|
42600
42571
|
QUnit.test('add returns the set', function () {
|
42601
42572
|
var obj = {};
|
42602
42573
|
equal(map.add(obj), map);
|
@@ -46842,7 +46813,7 @@ enifed('ember-metal/tests/watching/watch_test', ['ember-environment', 'ember-met
|
|
46842
46813
|
equal(meta_objB.peekWatching('foo'), 1, 'should be watching foo');
|
46843
46814
|
equal(meta_objB.readableChainWatchers().has('foo', chainNode), true, 'should have chain watcher');
|
46844
46815
|
|
46845
|
-
(0, _emberMetal.
|
46816
|
+
(0, _emberMetal.deleteMeta)(objA);
|
46846
46817
|
|
46847
46818
|
equal(meta_objB.peekWatching('foo'), 0, 'should not be watching foo');
|
46848
46819
|
equal(meta_objB.readableChainWatchers().has('foo', chainNode), false, 'should not have chain watcher');
|
@@ -52726,14 +52697,16 @@ enifed('ember-runtime/tests/inject_test', ['ember-metal', 'ember-runtime/inject'
|
|
52726
52697
|
});
|
52727
52698
|
}
|
52728
52699
|
|
52729
|
-
|
52730
|
-
|
52731
|
-
|
52732
|
-
|
52733
|
-
|
52700
|
+
if (true) {
|
52701
|
+
QUnit.test('factories should return a list of lazy injection full names', function () {
|
52702
|
+
var AnObject = _object.default.extend({
|
52703
|
+
foo: new _emberMetal.InjectedProperty('foo', 'bar'),
|
52704
|
+
bar: new _emberMetal.InjectedProperty('quux')
|
52705
|
+
});
|
52734
52706
|
|
52735
|
-
|
52736
|
-
|
52707
|
+
deepEqual(AnObject._lazyInjections(), { 'foo': 'foo:bar', 'bar': 'quux:bar' }, 'should return injected container keys');
|
52708
|
+
});
|
52709
|
+
}
|
52737
52710
|
});
|
52738
52711
|
QUnit.module('ESLint | ember-runtime/tests/inject_test.js');
|
52739
52712
|
QUnit.test('should pass ESLint', function(assert) {
|
@@ -63049,68 +63022,24 @@ enifed('ember-runtime/tests/system/string/camelize_test', ['ember-environment',
|
|
63049
63022
|
});
|
63050
63023
|
}
|
63051
63024
|
|
63052
|
-
|
63053
|
-
|
63054
|
-
|
63055
|
-
|
63056
|
-
|
63057
|
-
|
63058
|
-
|
63059
|
-
|
63060
|
-
deepEqual((0, _string.camelize)('I Love Ramen'), 'iLoveRamen');
|
63061
|
-
if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
|
63062
|
-
deepEqual('I Love Ramen'.camelize(), 'iLoveRamen');
|
63063
|
-
}
|
63064
|
-
});
|
63065
|
-
|
63066
|
-
QUnit.test('camelize dasherized string', function () {
|
63067
|
-
deepEqual((0, _string.camelize)('css-class-name'), 'cssClassName');
|
63068
|
-
if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
|
63069
|
-
deepEqual('css-class-name'.camelize(), 'cssClassName');
|
63070
|
-
}
|
63071
|
-
});
|
63072
|
-
|
63073
|
-
QUnit.test('camelize underscored string', function () {
|
63074
|
-
deepEqual((0, _string.camelize)('action_name'), 'actionName');
|
63075
|
-
if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
|
63076
|
-
deepEqual('action_name'.camelize(), 'actionName');
|
63077
|
-
}
|
63078
|
-
});
|
63079
|
-
|
63080
|
-
QUnit.test('camelize dot notation string', function () {
|
63081
|
-
deepEqual((0, _string.camelize)('action.name'), 'actionName');
|
63082
|
-
if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
|
63083
|
-
deepEqual('action.name'.camelize(), 'actionName');
|
63084
|
-
}
|
63085
|
-
});
|
63086
|
-
|
63087
|
-
QUnit.test('does nothing with camelcased string', function () {
|
63088
|
-
deepEqual((0, _string.camelize)('innerHTML'), 'innerHTML');
|
63089
|
-
if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
|
63090
|
-
deepEqual('innerHTML'.camelize(), 'innerHTML');
|
63091
|
-
}
|
63092
|
-
});
|
63093
|
-
|
63094
|
-
QUnit.test('camelize namespaced classified string', function () {
|
63095
|
-
deepEqual((0, _string.camelize)('PrivateDocs/OwnerInvoice'), 'privateDocs/ownerInvoice');
|
63096
|
-
if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
|
63097
|
-
deepEqual('PrivateDocs/OwnerInvoice'.camelize(), 'privateDocs/ownerInvoice');
|
63098
|
-
}
|
63099
|
-
});
|
63100
|
-
|
63101
|
-
QUnit.test('camelize namespaced underscored string', function () {
|
63102
|
-
deepEqual((0, _string.camelize)('private_docs/owner_invoice'), 'privateDocs/ownerInvoice');
|
63103
|
-
if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
|
63104
|
-
deepEqual('private_docs/owner_invoice'.camelize(), 'privateDocs/ownerInvoice');
|
63105
|
-
}
|
63106
|
-
});
|
63025
|
+
function test(given, expected, description) {
|
63026
|
+
QUnit.test(description, function () {
|
63027
|
+
deepEqual((0, _string.camelize)(given), expected);
|
63028
|
+
if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
|
63029
|
+
deepEqual(given.camelize(), expected);
|
63030
|
+
}
|
63031
|
+
});
|
63032
|
+
}
|
63107
63033
|
|
63108
|
-
|
63109
|
-
|
63110
|
-
|
63111
|
-
|
63112
|
-
|
63113
|
-
|
63034
|
+
test('my favorite items', 'myFavoriteItems', 'camelize normal string');
|
63035
|
+
test('I Love Ramen', 'iLoveRamen', 'camelize capitalized string');
|
63036
|
+
test('css-class-name', 'cssClassName', 'camelize dasherized string');
|
63037
|
+
test('action_name', 'actionName', 'camelize underscored string');
|
63038
|
+
test('action.name', 'actionName', 'camelize dot notation string');
|
63039
|
+
test('innerHTML', 'innerHTML', 'does nothing with camelcased string');
|
63040
|
+
test('PrivateDocs/OwnerInvoice', 'privateDocs/ownerInvoice', 'camelize namespaced classified string');
|
63041
|
+
test('private_docs/owner_invoice', 'privateDocs/ownerInvoice', 'camelize namespaced underscored string');
|
63042
|
+
test('private-docs/owner-invoice', 'privateDocs/ownerInvoice', 'camelize namespaced dasherized string');
|
63114
63043
|
});
|
63115
63044
|
QUnit.module('ESLint | ember-runtime/tests/system/string/camelize_test.js');
|
63116
63045
|
QUnit.test('should pass ESLint', function(assert) {
|
@@ -63129,68 +63058,24 @@ enifed('ember-runtime/tests/system/string/capitalize_test', ['ember-environment'
|
|
63129
63058
|
});
|
63130
63059
|
}
|
63131
63060
|
|
63132
|
-
|
63133
|
-
|
63134
|
-
|
63135
|
-
|
63136
|
-
|
63137
|
-
|
63138
|
-
|
63139
|
-
|
63140
|
-
deepEqual((0, _string.capitalize)('css-class-name'), 'Css-class-name');
|
63141
|
-
if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
|
63142
|
-
deepEqual('css-class-name'.capitalize(), 'Css-class-name');
|
63143
|
-
}
|
63144
|
-
});
|
63145
|
-
|
63146
|
-
QUnit.test('capitalize underscored string', function () {
|
63147
|
-
deepEqual((0, _string.capitalize)('action_name'), 'Action_name');
|
63148
|
-
if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
|
63149
|
-
deepEqual('action_name'.capitalize(), 'Action_name');
|
63150
|
-
}
|
63151
|
-
});
|
63152
|
-
|
63153
|
-
QUnit.test('capitalize camelcased string', function () {
|
63154
|
-
deepEqual((0, _string.capitalize)('innerHTML'), 'InnerHTML');
|
63155
|
-
if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
|
63156
|
-
deepEqual('innerHTML'.capitalize(), 'InnerHTML');
|
63157
|
-
}
|
63158
|
-
});
|
63159
|
-
|
63160
|
-
QUnit.test('does nothing with capitalized string', function () {
|
63161
|
-
deepEqual((0, _string.capitalize)('Capitalized string'), 'Capitalized string');
|
63162
|
-
if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
|
63163
|
-
deepEqual('Capitalized string'.capitalize(), 'Capitalized string');
|
63164
|
-
}
|
63165
|
-
});
|
63166
|
-
|
63167
|
-
QUnit.test('capitalize namespaced camelized string', function () {
|
63168
|
-
deepEqual((0, _string.capitalize)('privateDocs/ownerInvoice'), 'PrivateDocs/OwnerInvoice');
|
63169
|
-
if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
|
63170
|
-
deepEqual('privateDocs/ownerInvoice'.capitalize(), 'PrivateDocs/OwnerInvoice');
|
63171
|
-
}
|
63172
|
-
});
|
63173
|
-
|
63174
|
-
QUnit.test('capitalize namespaced underscored string', function () {
|
63175
|
-
deepEqual((0, _string.capitalize)('private_docs/owner_invoice'), 'Private_docs/Owner_invoice');
|
63176
|
-
if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
|
63177
|
-
deepEqual('private_docs/owner_invoice'.capitalize(), 'Private_docs/Owner_invoice');
|
63178
|
-
}
|
63179
|
-
});
|
63180
|
-
|
63181
|
-
QUnit.test('capitalize namespaced dasherized string', function () {
|
63182
|
-
deepEqual((0, _string.capitalize)('private-docs/owner-invoice'), 'Private-docs/Owner-invoice');
|
63183
|
-
if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
|
63184
|
-
deepEqual('private-docs/owner-invoice'.capitalize(), 'Private-docs/Owner-invoice');
|
63185
|
-
}
|
63186
|
-
});
|
63061
|
+
function test(given, expected, description) {
|
63062
|
+
QUnit.test(description, function () {
|
63063
|
+
deepEqual((0, _string.capitalize)(given), expected);
|
63064
|
+
if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
|
63065
|
+
deepEqual(given.capitalize(), expected);
|
63066
|
+
}
|
63067
|
+
});
|
63068
|
+
}
|
63187
63069
|
|
63188
|
-
|
63189
|
-
|
63190
|
-
|
63191
|
-
|
63192
|
-
|
63193
|
-
|
63070
|
+
test('my favorite items', 'My favorite items', 'capitalize normal string');
|
63071
|
+
test('css-class-name', 'Css-class-name', 'capitalize dasherized string');
|
63072
|
+
test('action_name', 'Action_name', 'capitalize underscored string');
|
63073
|
+
test('innerHTML', 'InnerHTML', 'capitalize camelcased string');
|
63074
|
+
test('Capitalized string', 'Capitalized string', 'does nothing with capitalized string');
|
63075
|
+
test('privateDocs/ownerInvoice', 'PrivateDocs/OwnerInvoice', 'capitalize namespaced camelized string');
|
63076
|
+
test('private_docs/owner_invoice', 'Private_docs/Owner_invoice', 'capitalize namespaced underscored string');
|
63077
|
+
test('private-docs/owner-invoice', 'Private-docs/Owner-invoice', 'capitalize namespaced dasherized string');
|
63078
|
+
test('šabc', 'Šabc', 'capitalize string with accent character');
|
63194
63079
|
});
|
63195
63080
|
QUnit.module('ESLint | ember-runtime/tests/system/string/capitalize_test.js');
|
63196
63081
|
QUnit.test('should pass ESLint', function(assert) {
|
@@ -63251,61 +63136,23 @@ enifed('ember-runtime/tests/system/string/dasherize_test', ['ember-environment',
|
|
63251
63136
|
});
|
63252
63137
|
}
|
63253
63138
|
|
63254
|
-
|
63255
|
-
|
63256
|
-
|
63257
|
-
|
63258
|
-
|
63259
|
-
|
63260
|
-
|
63261
|
-
|
63262
|
-
deepEqual((0, _string.dasherize)('css-class-name'), 'css-class-name');
|
63263
|
-
if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
|
63264
|
-
deepEqual('css-class-name'.dasherize(), 'css-class-name');
|
63265
|
-
}
|
63266
|
-
});
|
63267
|
-
|
63268
|
-
QUnit.test('dasherize underscored string', function () {
|
63269
|
-
deepEqual((0, _string.dasherize)('action_name'), 'action-name');
|
63270
|
-
if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
|
63271
|
-
deepEqual('action_name'.dasherize(), 'action-name');
|
63272
|
-
}
|
63273
|
-
});
|
63274
|
-
|
63275
|
-
QUnit.test('dasherize camelcased string', function () {
|
63276
|
-
deepEqual((0, _string.dasherize)('innerHTML'), 'inner-html');
|
63277
|
-
if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
|
63278
|
-
deepEqual('innerHTML'.dasherize(), 'inner-html');
|
63279
|
-
}
|
63280
|
-
});
|
63281
|
-
|
63282
|
-
QUnit.test('dasherize string that is the property name of Object.prototype', function () {
|
63283
|
-
deepEqual((0, _string.dasherize)('toString'), 'to-string');
|
63284
|
-
if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
|
63285
|
-
deepEqual('toString'.dasherize(), 'to-string');
|
63286
|
-
}
|
63287
|
-
});
|
63288
|
-
|
63289
|
-
QUnit.test('dasherize namespaced classified string', function () {
|
63290
|
-
deepEqual((0, _string.dasherize)('PrivateDocs/OwnerInvoice'), 'private-docs/owner-invoice');
|
63291
|
-
if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
|
63292
|
-
deepEqual('PrivateDocs/OwnerInvoice'.dasherize(), 'private-docs/owner-invoice');
|
63293
|
-
}
|
63294
|
-
});
|
63295
|
-
|
63296
|
-
QUnit.test('dasherize namespaced camelized string', function () {
|
63297
|
-
deepEqual((0, _string.dasherize)('privateDocs/ownerInvoice'), 'private-docs/owner-invoice');
|
63298
|
-
if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
|
63299
|
-
deepEqual('privateDocs/ownerInvoice'.dasherize(), 'private-docs/owner-invoice');
|
63300
|
-
}
|
63301
|
-
});
|
63139
|
+
function test(given, expected, description) {
|
63140
|
+
QUnit.test(description, function () {
|
63141
|
+
deepEqual((0, _string.dasherize)(given), expected);
|
63142
|
+
if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
|
63143
|
+
deepEqual(given.dasherize(), expected);
|
63144
|
+
}
|
63145
|
+
});
|
63146
|
+
}
|
63302
63147
|
|
63303
|
-
|
63304
|
-
|
63305
|
-
|
63306
|
-
|
63307
|
-
|
63308
|
-
|
63148
|
+
test('my favorite items', 'my-favorite-items', 'dasherize normal string');
|
63149
|
+
test('css-class-name', 'css-class-name', 'does nothing with dasherized string');
|
63150
|
+
test('action_name', 'action-name', 'dasherize underscored string');
|
63151
|
+
test('innerHTML', 'inner-html', 'dasherize camelcased string');
|
63152
|
+
test('toString', 'to-string', 'dasherize string that is the property name of Object.prototype');
|
63153
|
+
test('PrivateDocs/OwnerInvoice', 'private-docs/owner-invoice', 'dasherize namespaced classified string');
|
63154
|
+
test('privateDocs/ownerInvoice', 'private-docs/owner-invoice', 'dasherize namespaced camelized string');
|
63155
|
+
test('private_docs/owner_invoice', 'private-docs/owner-invoice', 'dasherize namespaced underscored string');
|
63309
63156
|
});
|
63310
63157
|
QUnit.module('ESLint | ember-runtime/tests/system/string/dasherize_test.js');
|
63311
63158
|
QUnit.test('should pass ESLint', function(assert) {
|
@@ -63324,54 +63171,22 @@ enifed('ember-runtime/tests/system/string/decamelize_test', ['ember-environment'
|
|
63324
63171
|
});
|
63325
63172
|
}
|
63326
63173
|
|
63327
|
-
|
63328
|
-
|
63329
|
-
|
63330
|
-
|
63331
|
-
|
63332
|
-
|
63333
|
-
|
63334
|
-
|
63335
|
-
deepEqual((0, _string.decamelize)('css-class-name'), 'css-class-name');
|
63336
|
-
if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
|
63337
|
-
deepEqual('css-class-name'.decamelize(), 'css-class-name');
|
63338
|
-
}
|
63339
|
-
});
|
63340
|
-
|
63341
|
-
QUnit.test('does nothing with underscored string', function () {
|
63342
|
-
deepEqual((0, _string.decamelize)('action_name'), 'action_name');
|
63343
|
-
if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
|
63344
|
-
deepEqual('action_name'.decamelize(), 'action_name');
|
63345
|
-
}
|
63346
|
-
});
|
63347
|
-
|
63348
|
-
QUnit.test('converts a camelized string into all lower case separated by underscores.', function () {
|
63349
|
-
deepEqual((0, _string.decamelize)('innerHTML'), 'inner_html');
|
63350
|
-
if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
|
63351
|
-
deepEqual('innerHTML'.decamelize(), 'inner_html');
|
63352
|
-
}
|
63353
|
-
});
|
63354
|
-
|
63355
|
-
QUnit.test('decamelizes strings with numbers', function () {
|
63356
|
-
deepEqual((0, _string.decamelize)('size160Url'), 'size160_url');
|
63357
|
-
if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
|
63358
|
-
deepEqual('size160Url'.decamelize(), 'size160_url');
|
63359
|
-
}
|
63360
|
-
});
|
63361
|
-
|
63362
|
-
QUnit.test('decamelize namespaced classified string', function () {
|
63363
|
-
deepEqual((0, _string.decamelize)('PrivateDocs/OwnerInvoice'), 'private_docs/owner_invoice');
|
63364
|
-
if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
|
63365
|
-
deepEqual('PrivateDocs/OwnerInvoice'.decamelize(), 'private_docs/owner_invoice');
|
63366
|
-
}
|
63367
|
-
});
|
63174
|
+
function test(given, expected, description) {
|
63175
|
+
QUnit.test(description, function () {
|
63176
|
+
deepEqual((0, _string.decamelize)(given), expected);
|
63177
|
+
if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
|
63178
|
+
deepEqual(given.decamelize(), expected);
|
63179
|
+
}
|
63180
|
+
});
|
63181
|
+
}
|
63368
63182
|
|
63369
|
-
|
63370
|
-
|
63371
|
-
|
63372
|
-
|
63373
|
-
|
63374
|
-
|
63183
|
+
test('my favorite items', 'my favorite items', 'does nothing with normal string');
|
63184
|
+
test('css-class-name', 'css-class-name', 'does nothing with dasherized string');
|
63185
|
+
test('action_name', 'action_name', 'does nothing with underscored string');
|
63186
|
+
test('innerHTML', 'inner_html', 'converts a camelized string into all lower case separated by underscores.');
|
63187
|
+
test('size160Url', 'size160_url', 'decamelizes strings with numbers');
|
63188
|
+
test('PrivateDocs/OwnerInvoice', 'private_docs/owner_invoice', 'decamelize namespaced classified string');
|
63189
|
+
test('privateDocs/ownerInvoice', 'private_docs/owner_invoice', 'decamelize namespaced camelized string');
|
63375
63190
|
});
|
63376
63191
|
QUnit.module('ESLint | ember-runtime/tests/system/string/decamelize_test.js');
|
63377
63192
|
QUnit.test('should pass ESLint', function(assert) {
|
@@ -63390,38 +63205,20 @@ enifed('ember-runtime/tests/system/string/fmt_string_test', ['ember-environment'
|
|
63390
63205
|
});
|
63391
63206
|
}
|
63392
63207
|
|
63393
|
-
|
63394
|
-
|
63395
|
-
|
63396
|
-
|
63397
|
-
|
63398
|
-
|
63399
|
-
|
63400
|
-
|
63401
|
-
|
63402
|
-
expectDeprecation('Ember.String.fmt is deprecated, use ES6 template strings instead.');
|
63403
|
-
equal((0, _string.fmt)('Hello %@2 %@1', ['John', 'Doe']), 'Hello Doe John');
|
63404
|
-
if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
|
63405
|
-
equal('Hello %@2 %@1'.fmt('John', 'Doe'), 'Hello Doe John');
|
63406
|
-
}
|
63407
|
-
});
|
63408
|
-
|
63409
|
-
QUnit.test('\'%@08 %@07 %@06 %@05 %@04 %@03 %@02 %@01\'.fmt(\'One\', \'Two\', \'Three\', \'Four\', \'Five\', \'Six\', \'Seven\', \'Eight\') => \'Eight Seven Six Five Four Three Two One\'', function () {
|
63410
|
-
expectDeprecation('Ember.String.fmt is deprecated, use ES6 template strings instead.');
|
63411
|
-
equal((0, _string.fmt)('%@08 %@07 %@06 %@05 %@04 %@03 %@02 %@01', ['One', 'Two', 'Three', 'Four', 'Five', 'Six', 'Seven', 'Eight']), 'Eight Seven Six Five Four Three Two One');
|
63412
|
-
|
63413
|
-
if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
|
63414
|
-
equal('%@08 %@07 %@06 %@05 %@04 %@03 %@02 %@01'.fmt('One', 'Two', 'Three', 'Four', 'Five', 'Six', 'Seven', 'Eight'), 'Eight Seven Six Five Four Three Two One');
|
63415
|
-
}
|
63416
|
-
});
|
63208
|
+
function test(given, args, expected, description) {
|
63209
|
+
QUnit.test(description, function () {
|
63210
|
+
expectDeprecation('Ember.String.fmt is deprecated, use ES6 template strings instead.');
|
63211
|
+
equal((0, _string.fmt)(given, args), expected);
|
63212
|
+
if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
|
63213
|
+
equal(given.fmt.apply(given, args), expected);
|
63214
|
+
}
|
63215
|
+
});
|
63216
|
+
}
|
63417
63217
|
|
63418
|
-
|
63419
|
-
|
63420
|
-
|
63421
|
-
|
63422
|
-
equal('data: %@'.fmt({ id: 3 }), 'data: {id: 3}');
|
63423
|
-
}
|
63424
|
-
});
|
63218
|
+
test('Hello %@ %@', ['John', 'Doe'], 'Hello John Doe', 'fmt(\'Hello %@ %@\', [\'John\', \'Doe\']) => \'Hello John Doe\'');
|
63219
|
+
test('Hello %@2 %@1', ['John', 'Doe'], 'Hello Doe John', 'fmt(\'Hello %@2 %@1\', [\'John\', \'Doe\']) => \'Hello Doe John\'');
|
63220
|
+
test('%@08 %@07 %@06 %@05 %@04 %@03 %@02 %@01', ['One', 'Two', 'Three', 'Four', 'Five', 'Six', 'Seven', 'Eight'], 'Eight Seven Six Five Four Three Two One', 'fmt(\'%@08 %@07 %@06 %@05 %@04 %@03 %@02 %@01\', [\'One\', \'Two\', \'Three\', \'Four\', \'Five\', \'Six\', \'Seven\', \'Eight\']) => \'Eight Seven Six Five Four Three Two One\'');
|
63221
|
+
test('data: %@', [{ id: 3 }], 'data: {id: 3}', 'fmt(\'data: %@\', [{ id: 3 }]) => \'data: {id: 3}\'');
|
63425
63222
|
|
63426
63223
|
QUnit.test('works with argument form', function () {
|
63427
63224
|
expectDeprecation('Ember.String.fmt is deprecated, use ES6 template strings instead.');
|
@@ -63462,33 +63259,19 @@ enifed('ember-runtime/tests/system/string/loc_test', ['ember-metal', 'ember-envi
|
|
63462
63259
|
});
|
63463
63260
|
}
|
63464
63261
|
|
63465
|
-
|
63466
|
-
|
63467
|
-
|
63468
|
-
|
63469
|
-
|
63470
|
-
|
63471
|
-
|
63472
|
-
|
63473
|
-
equal((0, _string.loc)('_Hello %@ %@', ['John', 'Doe']), 'Bonjour John Doe');
|
63474
|
-
if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
|
63475
|
-
equal('_Hello %@ %@'.loc('John', 'Doe'), 'Bonjour John Doe');
|
63476
|
-
}
|
63477
|
-
});
|
63478
|
-
|
63479
|
-
QUnit.test('\'_Hello %@# %@#\'.loc(\'John\', \'Doe\') => \'Bonjour Doe John\'', function () {
|
63480
|
-
equal((0, _string.loc)('_Hello %@# %@#', ['John', 'Doe']), 'Bonjour Doe John');
|
63481
|
-
if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
|
63482
|
-
equal('_Hello %@# %@#'.loc('John', 'Doe'), 'Bonjour Doe John');
|
63483
|
-
}
|
63484
|
-
});
|
63262
|
+
function test(given, args, expected, description) {
|
63263
|
+
QUnit.test(description, function () {
|
63264
|
+
equal((0, _string.loc)(given, args), expected);
|
63265
|
+
if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
|
63266
|
+
equal(given.loc.apply(given, args), expected);
|
63267
|
+
}
|
63268
|
+
});
|
63269
|
+
}
|
63485
63270
|
|
63486
|
-
|
63487
|
-
|
63488
|
-
|
63489
|
-
|
63490
|
-
}
|
63491
|
-
});
|
63271
|
+
test('_Hello World', [], 'Bonjour le monde', 'loc(\'_Hello World\') => \'Bonjour le monde\'');
|
63272
|
+
test('_Hello %@ %@', ['John', 'Doe'], 'Bonjour John Doe', 'loc(\'_Hello %@ %@\', [\'John\', \'Doe\']) => \'Bonjour John Doe\'');
|
63273
|
+
test('_Hello %@# %@#', ['John', 'Doe'], 'Bonjour Doe John', 'loc(\'_Hello %@# %@#\', [\'John\', \'Doe\']) => \'Bonjour Doe John\'');
|
63274
|
+
test('_Not In Strings', [], '_Not In Strings', 'loc(\'_Not In Strings\') => \'_Not In Strings\'');
|
63492
63275
|
|
63493
63276
|
QUnit.test('works with argument form', function () {
|
63494
63277
|
equal((0, _string.loc)('_Hello %@', 'John'), 'Bonjour John');
|
@@ -63512,54 +63295,22 @@ enifed('ember-runtime/tests/system/string/underscore_test', ['ember-environment'
|
|
63512
63295
|
});
|
63513
63296
|
}
|
63514
63297
|
|
63515
|
-
|
63516
|
-
|
63517
|
-
|
63518
|
-
|
63519
|
-
|
63520
|
-
|
63521
|
-
|
63522
|
-
|
63523
|
-
deepEqual((0, _string.underscore)('css-class-name'), 'css_class_name');
|
63524
|
-
if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
|
63525
|
-
deepEqual('css-class-name'.underscore(), 'css_class_name');
|
63526
|
-
}
|
63527
|
-
});
|
63528
|
-
|
63529
|
-
QUnit.test('does nothing with underscored string', function () {
|
63530
|
-
deepEqual((0, _string.underscore)('action_name'), 'action_name');
|
63531
|
-
if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
|
63532
|
-
deepEqual('action_name'.underscore(), 'action_name');
|
63533
|
-
}
|
63534
|
-
});
|
63535
|
-
|
63536
|
-
QUnit.test('with camelcased string', function () {
|
63537
|
-
deepEqual((0, _string.underscore)('innerHTML'), 'inner_html');
|
63538
|
-
if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
|
63539
|
-
deepEqual('innerHTML'.underscore(), 'inner_html');
|
63540
|
-
}
|
63541
|
-
});
|
63542
|
-
|
63543
|
-
QUnit.test('underscore namespaced classified string', function () {
|
63544
|
-
deepEqual((0, _string.underscore)('PrivateDocs/OwnerInvoice'), 'private_docs/owner_invoice');
|
63545
|
-
if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
|
63546
|
-
deepEqual('PrivateDocs/OwnerInvoice'.underscore(), 'private_docs/owner_invoice');
|
63547
|
-
}
|
63548
|
-
});
|
63549
|
-
|
63550
|
-
QUnit.test('underscore namespaced camelized string', function () {
|
63551
|
-
deepEqual((0, _string.underscore)('privateDocs/ownerInvoice'), 'private_docs/owner_invoice');
|
63552
|
-
if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
|
63553
|
-
deepEqual('privateDocs/ownerInvoice'.underscore(), 'private_docs/owner_invoice');
|
63554
|
-
}
|
63555
|
-
});
|
63298
|
+
function test(given, expected, description) {
|
63299
|
+
QUnit.test(description, function () {
|
63300
|
+
deepEqual((0, _string.underscore)(given), expected);
|
63301
|
+
if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
|
63302
|
+
deepEqual(given.underscore(), expected);
|
63303
|
+
}
|
63304
|
+
});
|
63305
|
+
}
|
63556
63306
|
|
63557
|
-
|
63558
|
-
|
63559
|
-
|
63560
|
-
|
63561
|
-
|
63562
|
-
|
63307
|
+
test('my favorite items', 'my_favorite_items', 'with normal string');
|
63308
|
+
test('css-class-name', 'css_class_name', 'with dasherized string');
|
63309
|
+
test('action_name', 'action_name', 'does nothing with underscored string');
|
63310
|
+
test('innerHTML', 'inner_html', 'with camelcased string');
|
63311
|
+
test('PrivateDocs/OwnerInvoice', 'private_docs/owner_invoice', 'underscore namespaced classified string');
|
63312
|
+
test('privateDocs/ownerInvoice', 'private_docs/owner_invoice', 'underscore namespaced camelized string');
|
63313
|
+
test('private-docs/owner-invoice', 'private_docs/owner_invoice', 'underscore namespaced dasherized string');
|
63563
63314
|
});
|
63564
63315
|
QUnit.module('ESLint | ember-runtime/tests/system/string/underscore_test.js');
|
63565
63316
|
QUnit.test('should pass ESLint', function(assert) {
|
@@ -63578,26 +63329,18 @@ enifed('ember-runtime/tests/system/string/w_test', ['ember-environment', 'ember-
|
|
63578
63329
|
});
|
63579
63330
|
}
|
63580
63331
|
|
63581
|
-
|
63582
|
-
|
63583
|
-
|
63584
|
-
|
63585
|
-
|
63586
|
-
|
63587
|
-
|
63588
|
-
|
63589
|
-
deepEqual((0, _string.w)('one two three'), ['one', 'two', 'three']);
|
63590
|
-
if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
|
63591
|
-
deepEqual('one two three'.w(), ['one', 'two', 'three']);
|
63592
|
-
}
|
63593
|
-
});
|
63332
|
+
function test(given, expected, description) {
|
63333
|
+
QUnit.test(description, function () {
|
63334
|
+
deepEqual((0, _string.w)(given), expected);
|
63335
|
+
if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
|
63336
|
+
deepEqual(given.w(), expected);
|
63337
|
+
}
|
63338
|
+
});
|
63339
|
+
}
|
63594
63340
|
|
63595
|
-
|
63596
|
-
|
63597
|
-
|
63598
|
-
deepEqual('one\ttwo three'.w(), ['one', 'two', 'three']);
|
63599
|
-
}
|
63600
|
-
});
|
63341
|
+
test('one two three', ['one', 'two', 'three'], 'w(\'one two three\') => [\'one\',\'two\',\'three\']');
|
63342
|
+
test('one two three', ['one', 'two', 'three'], 'w(\'one two three\') with extra spaces between words => [\'one\',\'two\',\'three\']');
|
63343
|
+
test('one\ttwo three', ['one', 'two', 'three'], 'w(\'one two three\') with tabs');
|
63601
63344
|
});
|
63602
63345
|
QUnit.module('ESLint | ember-runtime/tests/system/string/w_test.js');
|
63603
63346
|
QUnit.test('should pass ESLint', function(assert) {
|
@@ -66615,6 +66358,12 @@ enifed('ember-utils/tests/can_invoke_test', ['ember-utils'], function (_emberUti
|
|
66615
66358
|
equal((0, _emberUtils.canInvoke)(undefined, 'aMethodThatDoesNotExist'), false);
|
66616
66359
|
});
|
66617
66360
|
|
66361
|
+
QUnit.test('should return true for falsy values that have methods', function () {
|
66362
|
+
equal((0, _emberUtils.canInvoke)(false, 'valueOf'), true);
|
66363
|
+
equal((0, _emberUtils.canInvoke)('', 'charAt'), true);
|
66364
|
+
equal((0, _emberUtils.canInvoke)(0, 'toFixed'), true);
|
66365
|
+
});
|
66366
|
+
|
66618
66367
|
QUnit.test('should return true if the method exists on the object', function () {
|
66619
66368
|
equal((0, _emberUtils.canInvoke)(obj, 'aMethodThatExists'), true);
|
66620
66369
|
});
|
@@ -69411,11 +69160,13 @@ enifed('ember/tests/helpers/link_to_test/link_to_transitioning_classes_test', ['
|
|
69411
69160
|
|
69412
69161
|
_this2.aboutDefer = _emberRuntime.RSVP.defer();
|
69413
69162
|
_this2.otherDefer = _emberRuntime.RSVP.defer();
|
69163
|
+
_this2.newsDefer = _emberRuntime.RSVP.defer();
|
69414
69164
|
var _this = _this2;
|
69415
69165
|
|
69416
69166
|
_this2.router.map(function () {
|
69417
69167
|
this.route('about');
|
69418
69168
|
this.route('other');
|
69169
|
+
this.route('news');
|
69419
69170
|
});
|
69420
69171
|
|
69421
69172
|
_this2.add('route:about', _emberRouting.Route.extend({
|
@@ -69430,7 +69181,13 @@ enifed('ember/tests/helpers/link_to_test/link_to_transitioning_classes_test', ['
|
|
69430
69181
|
}
|
69431
69182
|
}));
|
69432
69183
|
|
69433
|
-
_this2.
|
69184
|
+
_this2.add('route:news', _emberRouting.Route.extend({
|
69185
|
+
model: function () {
|
69186
|
+
return _this.newsDefer.promise;
|
69187
|
+
}
|
69188
|
+
}));
|
69189
|
+
|
69190
|
+
_this2.addTemplate('application', '\n {{outlet}}\n {{link-to \'Index\' \'index\' id=\'index-link\'}}\n {{link-to \'About\' \'about\' id=\'about-link\'}}\n {{link-to \'Other\' \'other\' id=\'other-link\'}}\n {{link-to \'News\' \'news\' activeClass=false id=\'news-link\'}}\n ');
|
69434
69191
|
|
69435
69192
|
_this2.visit('/');
|
69436
69193
|
return _this2;
|
@@ -69440,6 +69197,7 @@ enifed('ember/tests/helpers/link_to_test/link_to_transitioning_classes_test', ['
|
|
69440
69197
|
_ApplicationTestCase.prototype.teardown.call(this);
|
69441
69198
|
this.aboutDefer = null;
|
69442
69199
|
this.otherDefer = null;
|
69200
|
+
this.newsDefer = null;
|
69443
69201
|
};
|
69444
69202
|
|
69445
69203
|
_class.prototype['@test while a transition is underway'] = function testWhileATransitionIsUnderway(assert) {
|
@@ -69480,6 +69238,44 @@ enifed('ember/tests/helpers/link_to_test/link_to_transitioning_classes_test', ['
|
|
69480
69238
|
assertHasNoClass(assert, $other, 'ember-transitioning-out');
|
69481
69239
|
};
|
69482
69240
|
|
69241
|
+
_class.prototype['@test while a transition is underway with activeClass is false'] = function testWhileATransitionIsUnderwayWithActiveClassIsFalse(assert) {
|
69242
|
+
var _this4 = this;
|
69243
|
+
|
69244
|
+
var $index = this.$('#index-link');
|
69245
|
+
var $news = this.$('#news-link');
|
69246
|
+
var $other = this.$('#other-link');
|
69247
|
+
|
69248
|
+
$news.click();
|
69249
|
+
|
69250
|
+
assertHasClass(assert, $index, 'active');
|
69251
|
+
assertHasNoClass(assert, $news, 'active');
|
69252
|
+
assertHasNoClass(assert, $other, 'active');
|
69253
|
+
|
69254
|
+
assertHasNoClass(assert, $index, 'ember-transitioning-in');
|
69255
|
+
assertHasClass(assert, $news, 'ember-transitioning-in');
|
69256
|
+
assertHasNoClass(assert, $other, 'ember-transitioning-in');
|
69257
|
+
|
69258
|
+
assertHasClass(assert, $index, 'ember-transitioning-out');
|
69259
|
+
assertHasNoClass(assert, $news, 'ember-transitioning-out');
|
69260
|
+
assertHasNoClass(assert, $other, 'ember-transitioning-out');
|
69261
|
+
|
69262
|
+
this.runTask(function () {
|
69263
|
+
return _this4.newsDefer.resolve();
|
69264
|
+
});
|
69265
|
+
|
69266
|
+
assertHasNoClass(assert, $index, 'active');
|
69267
|
+
assertHasNoClass(assert, $news, 'active');
|
69268
|
+
assertHasNoClass(assert, $other, 'active');
|
69269
|
+
|
69270
|
+
assertHasNoClass(assert, $index, 'ember-transitioning-in');
|
69271
|
+
assertHasNoClass(assert, $news, 'ember-transitioning-in');
|
69272
|
+
assertHasNoClass(assert, $other, 'ember-transitioning-in');
|
69273
|
+
|
69274
|
+
assertHasNoClass(assert, $index, 'ember-transitioning-out');
|
69275
|
+
assertHasNoClass(assert, $news, 'ember-transitioning-out');
|
69276
|
+
assertHasNoClass(assert, $other, 'ember-transitioning-out');
|
69277
|
+
};
|
69278
|
+
|
69483
69279
|
return _class;
|
69484
69280
|
}(_internalTestHelpers.ApplicationTestCase));
|
69485
69281
|
|
@@ -69489,51 +69285,51 @@ enifed('ember/tests/helpers/link_to_test/link_to_transitioning_classes_test', ['
|
|
69489
69285
|
function _class2() {
|
69490
69286
|
(0, _emberBabel.classCallCheck)(this, _class2);
|
69491
69287
|
|
69492
|
-
var
|
69288
|
+
var _this5 = (0, _emberBabel.possibleConstructorReturn)(this, _ApplicationTestCase2.call(this));
|
69493
69289
|
|
69494
|
-
|
69495
|
-
|
69496
|
-
var _this =
|
69290
|
+
_this5.aboutDefer = _emberRuntime.RSVP.defer();
|
69291
|
+
_this5.otherDefer = _emberRuntime.RSVP.defer();
|
69292
|
+
var _this = _this5;
|
69497
69293
|
|
69498
|
-
|
69294
|
+
_this5.router.map(function () {
|
69499
69295
|
this.route('parent-route', function () {
|
69500
69296
|
this.route('about');
|
69501
69297
|
this.route('other');
|
69502
69298
|
});
|
69503
69299
|
});
|
69504
|
-
|
69300
|
+
_this5.add('route:parent-route.about', _emberRouting.Route.extend({
|
69505
69301
|
model: function () {
|
69506
69302
|
return _this.aboutDefer.promise;
|
69507
69303
|
}
|
69508
69304
|
}));
|
69509
69305
|
|
69510
|
-
|
69306
|
+
_this5.add('route:parent-route.other', _emberRouting.Route.extend({
|
69511
69307
|
model: function () {
|
69512
69308
|
return _this.otherDefer.promise;
|
69513
69309
|
}
|
69514
69310
|
}));
|
69515
69311
|
|
69516
|
-
|
69312
|
+
_this5.addTemplate('application', '\n {{outlet}}\n {{#link-to \'index\' tagName=\'li\'}}\n {{link-to \'Index\' \'index\' id=\'index-link\'}}\n {{/link-to}}\n {{#link-to \'parent-route.about\' tagName=\'li\'}}\n {{link-to \'About\' \'parent-route.about\' id=\'about-link\'}}\n {{/link-to}}\n {{#link-to \'parent-route.other\' tagName=\'li\'}}\n {{link-to \'Other\' \'parent-route.other\' id=\'other-link\'}}\n {{/link-to}}\n ');
|
69517
69313
|
|
69518
|
-
|
69519
|
-
return
|
69314
|
+
_this5.visit('/');
|
69315
|
+
return _this5;
|
69520
69316
|
}
|
69521
69317
|
|
69522
69318
|
_class2.prototype.resolveAbout = function resolveAbout() {
|
69523
|
-
var
|
69319
|
+
var _this6 = this;
|
69524
69320
|
|
69525
69321
|
return this.runTask(function () {
|
69526
|
-
|
69527
|
-
|
69322
|
+
_this6.aboutDefer.resolve();
|
69323
|
+
_this6.aboutDefer = _emberRuntime.RSVP.defer();
|
69528
69324
|
});
|
69529
69325
|
};
|
69530
69326
|
|
69531
69327
|
_class2.prototype.resolveOther = function resolveOther() {
|
69532
|
-
var
|
69328
|
+
var _this7 = this;
|
69533
69329
|
|
69534
69330
|
return this.runTask(function () {
|
69535
|
-
|
69536
|
-
|
69331
|
+
_this7.otherDefer.resolve();
|
69332
|
+
_this7.otherDefer = _emberRuntime.RSVP.defer();
|
69537
69333
|
});
|
69538
69334
|
};
|
69539
69335
|
|
@@ -70387,7 +70183,7 @@ enifed('ember/tests/reexports_test', ['ember/index', 'internal-test-helpers', 'e
|
|
70387
70183
|
['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' }],
|
70388
70184
|
// ['create'], TODO: figure out what to do here
|
70389
70185
|
// ['keys'], TODO: figure out what to do here
|
70390
|
-
['FEATURES', 'ember/features'], ['FEATURES.isEnabled', 'ember-debug', 'isFeatureEnabled'], ['Error', 'ember-debug'], ['META_DESC', 'ember-metal'], ['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'], ['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'], ['required', 'ember-metal'], ['aliasMethod', 'ember-metal'], ['observer', 'ember-metal'], ['immediateObserver', 'ember-metal', '_immediateObserver'], ['mixin', 'ember-metal'], ['Mixin', 'ember-metal'], ['bind', 'ember-metal'], ['Binding', 'ember-metal'], ['isGlobalPath', 'ember-metal'],
|
70186
|
+
['FEATURES', 'ember/features'], ['FEATURES.isEnabled', 'ember-debug', 'isFeatureEnabled'], ['Error', 'ember-debug'], ['META_DESC', 'ember-metal'], ['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'], ['required', 'ember-metal'], ['aliasMethod', 'ember-metal'], ['observer', 'ember-metal'], ['immediateObserver', 'ember-metal', '_immediateObserver'], ['mixin', 'ember-metal'], ['Mixin', 'ember-metal'], ['bind', 'ember-metal'], ['Binding', 'ember-metal'], ['isGlobalPath', 'ember-metal'],
|
70391
70187
|
|
70392
70188
|
// ember-views
|
70393
70189
|
['$', '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'],
|