ember-source 2.16.3 → 2.17.0.beta.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -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.16.3
9
+ * @version 2.17.0-beta.4
10
10
  */
11
11
 
12
12
  var enifed, requireModule, Ember;
@@ -646,6 +646,31 @@ enifed('container/tests/container_test', ['ember-utils', 'ember-metal', 'contain
646
646
  assert.deepEqual(instance1.constructor, instance2.constructor);
647
647
  });
648
648
 
649
+ QUnit.test('can properly reset cache', function (assert) {
650
+ var registry = new _container.Registry();
651
+ var container = registry.container();
652
+
653
+ var Component = (0, _internalTestHelpers.factory)();
654
+ registry.register('component:foo-bar', Component);
655
+
656
+ var factory1 = container.factoryFor('component:foo-bar');
657
+ var factory2 = container.factoryFor('component:foo-bar');
658
+
659
+ var instance1 = container.lookup('component:foo-bar');
660
+ var instance2 = container.lookup('component:foo-bar');
661
+
662
+ assert.equal(instance1, instance2);
663
+ assert.equal(factory1, factory2);
664
+
665
+ container.reset();
666
+
667
+ var factory3 = container.factoryFor('component:foo-bar');
668
+ var instance3 = container.lookup('component:foo-bar');
669
+
670
+ assert.notEqual(instance1, instance3);
671
+ assert.notEqual(factory1, factory3);
672
+ });
673
+
649
674
  QUnit.test('#factoryFor created instances come with instance injections', function (assert) {
650
675
  var registry = new _container.Registry();
651
676
  var container = registry.container();
@@ -7462,7 +7487,7 @@ enifed('ember-glimmer/tests/integration/application/actions-test', ['ember-babel
7462
7487
  return _class2;
7463
7488
  }(_testCase.RenderingTest));
7464
7489
  });
7465
- 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) {
7490
+ 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) {
7466
7491
  'use strict';
7467
7492
 
7468
7493
  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 ']),
@@ -7827,8 +7852,15 @@ enifed('ember-glimmer/tests/integration/application/engine-test', ['ember-babel'
7827
7852
 
7828
7853
  assert.expect(2);
7829
7854
 
7855
+ var errorEntered = _emberRuntime.RSVP.defer();
7856
+
7830
7857
  this.setupAppAndRoutableEngine();
7831
7858
  this.additionalEngineRegistrations(function () {
7859
+ this.register('route:application_error', _emberRouting.Route.extend({
7860
+ activate: function () {
7861
+ _emberMetal.run.next(errorEntered.resolve);
7862
+ }
7863
+ }));
7832
7864
  this.register('template:application_error', (0, _helpers.compile)('Error! {{model.message}}'));
7833
7865
  this.register('route:post', _emberRouting.Route.extend({
7834
7866
  model: function () {
@@ -7840,6 +7872,8 @@ enifed('ember-glimmer/tests/integration/application/engine-test', ['ember-babel'
7840
7872
  return this.visit('/').then(function () {
7841
7873
  _this12.assertText('Application');
7842
7874
  return _this12.transitionTo('blog.post');
7875
+ }).then(function () {
7876
+ return errorEntered.promise;
7843
7877
  }).then(function () {
7844
7878
  _this12.assertText('ApplicationError! Oh, noes!');
7845
7879
  });
@@ -7850,8 +7884,15 @@ enifed('ember-glimmer/tests/integration/application/engine-test', ['ember-babel'
7850
7884
 
7851
7885
  assert.expect(2);
7852
7886
 
7887
+ var errorEntered = _emberRuntime.RSVP.defer();
7888
+
7853
7889
  this.setupAppAndRoutableEngine();
7854
7890
  this.additionalEngineRegistrations(function () {
7891
+ this.register('route:error', _emberRouting.Route.extend({
7892
+ activate: function () {
7893
+ _emberMetal.run.next(errorEntered.resolve);
7894
+ }
7895
+ }));
7855
7896
  this.register('template:error', (0, _helpers.compile)('Error! {{model.message}}'));
7856
7897
  this.register('route:post', _emberRouting.Route.extend({
7857
7898
  model: function () {
@@ -7863,6 +7904,8 @@ enifed('ember-glimmer/tests/integration/application/engine-test', ['ember-babel'
7863
7904
  return this.visit('/').then(function () {
7864
7905
  _this13.assertText('Application');
7865
7906
  return _this13.transitionTo('blog.post');
7907
+ }).then(function () {
7908
+ return errorEntered.promise;
7866
7909
  }).then(function () {
7867
7910
  _this13.assertText('ApplicationEngineError! Oh, noes!');
7868
7911
  });
@@ -7873,8 +7916,15 @@ enifed('ember-glimmer/tests/integration/application/engine-test', ['ember-babel'
7873
7916
 
7874
7917
  assert.expect(2);
7875
7918
 
7919
+ var errorEntered = _emberRuntime.RSVP.defer();
7920
+
7876
7921
  this.setupAppAndRoutableEngine();
7877
7922
  this.additionalEngineRegistrations(function () {
7923
+ this.register('route:post_error', _emberRouting.Route.extend({
7924
+ activate: function () {
7925
+ _emberMetal.run.next(errorEntered.resolve);
7926
+ }
7927
+ }));
7878
7928
  this.register('template:post_error', (0, _helpers.compile)('Error! {{model.message}}'));
7879
7929
  this.register('route:post', _emberRouting.Route.extend({
7880
7930
  model: function () {
@@ -7886,6 +7936,8 @@ enifed('ember-glimmer/tests/integration/application/engine-test', ['ember-babel'
7886
7936
  return this.visit('/').then(function () {
7887
7937
  _this14.assertText('Application');
7888
7938
  return _this14.transitionTo('blog.post');
7939
+ }).then(function () {
7940
+ return errorEntered.promise;
7889
7941
  }).then(function () {
7890
7942
  _this14.assertText('ApplicationEngineError! Oh, noes!');
7891
7943
  });
@@ -7896,8 +7948,15 @@ enifed('ember-glimmer/tests/integration/application/engine-test', ['ember-babel'
7896
7948
 
7897
7949
  assert.expect(2);
7898
7950
 
7951
+ var errorEntered = _emberRuntime.RSVP.defer();
7952
+
7899
7953
  this.setupAppAndRoutableEngine();
7900
7954
  this.additionalEngineRegistrations(function () {
7955
+ this.register('route:post.error', _emberRouting.Route.extend({
7956
+ activate: function () {
7957
+ _emberMetal.run.next(errorEntered.resolve);
7958
+ }
7959
+ }));
7901
7960
  this.register('template:post.error', (0, _helpers.compile)('Error! {{model.message}}'));
7902
7961
  this.register('route:post.comments', _emberRouting.Route.extend({
7903
7962
  model: function () {
@@ -7909,6 +7968,8 @@ enifed('ember-glimmer/tests/integration/application/engine-test', ['ember-babel'
7909
7968
  return this.visit('/').then(function () {
7910
7969
  _this15.assertText('Application');
7911
7970
  return _this15.transitionTo('blog.post.comments');
7971
+ }).then(function () {
7972
+ return errorEntered.promise;
7912
7973
  }).then(function () {
7913
7974
  _this15.assertText('ApplicationEngineError! Oh, noes!');
7914
7975
  });
@@ -7918,18 +7979,23 @@ enifed('ember-glimmer/tests/integration/application/engine-test', ['ember-babel'
7918
7979
  var _this16 = this;
7919
7980
 
7920
7981
  assert.expect(3);
7982
+ var done = assert.async();
7921
7983
 
7922
- var resolveLoading = void 0;
7984
+ var loadingEntered = _emberRuntime.RSVP.defer();
7985
+ var resolveLoading = _emberRuntime.RSVP.defer();
7923
7986
 
7924
7987
  this.setupAppAndRoutableEngine();
7925
7988
  this.additionalEngineRegistrations(function () {
7989
+ this.register('route:application_loading', _emberRouting.Route.extend({
7990
+ activate: function () {
7991
+ _emberMetal.run.next(loadingEntered.resolve);
7992
+ }
7993
+ }));
7926
7994
  this.register('template:application_loading', (0, _helpers.compile)('Loading'));
7927
7995
  this.register('template:post', (0, _helpers.compile)('Post'));
7928
7996
  this.register('route:post', _emberRouting.Route.extend({
7929
7997
  model: function () {
7930
- return new _emberRuntime.RSVP.Promise(function (resolve) {
7931
- resolveLoading = resolve;
7932
- });
7998
+ return resolveLoading.promise;
7933
7999
  }
7934
8000
  }));
7935
8001
  });
@@ -7938,16 +8004,17 @@ enifed('ember-glimmer/tests/integration/application/engine-test', ['ember-babel'
7938
8004
  _this16.assertText('Application');
7939
8005
  var transition = _this16.transitionTo('blog.post');
7940
8006
 
7941
- _this16.runTaskNext(function () {
8007
+ loadingEntered.promise.then(function () {
7942
8008
  _this16.assertText('ApplicationLoading');
7943
- resolveLoading();
7944
- });
8009
+ resolveLoading.resolve();
7945
8010
 
7946
- return transition.then(function () {
7947
8011
  _this16.runTaskNext(function () {
7948
- return _this16.assertText('ApplicationEnginePost');
8012
+ _this16.assertText('ApplicationEnginePost');
8013
+ done();
7949
8014
  });
7950
8015
  });
8016
+
8017
+ return transition;
7951
8018
  });
7952
8019
  };
7953
8020
 
@@ -7955,18 +8022,23 @@ enifed('ember-glimmer/tests/integration/application/engine-test', ['ember-babel'
7955
8022
  var _this17 = this;
7956
8023
 
7957
8024
  assert.expect(3);
8025
+ var done = assert.async();
7958
8026
 
7959
- var resolveLoading = void 0;
8027
+ var loadingEntered = _emberRuntime.RSVP.defer();
8028
+ var resolveLoading = _emberRuntime.RSVP.defer();
7960
8029
 
7961
8030
  this.setupAppAndRoutableEngine();
7962
8031
  this.additionalEngineRegistrations(function () {
8032
+ this.register('route:loading', _emberRouting.Route.extend({
8033
+ activate: function () {
8034
+ _emberMetal.run.next(loadingEntered.resolve);
8035
+ }
8036
+ }));
7963
8037
  this.register('template:loading', (0, _helpers.compile)('Loading'));
7964
8038
  this.register('template:post', (0, _helpers.compile)('Post'));
7965
8039
  this.register('route:post', _emberRouting.Route.extend({
7966
8040
  model: function () {
7967
- return new _emberRuntime.RSVP.Promise(function (resolve) {
7968
- resolveLoading = resolve;
7969
- });
8041
+ return resolveLoading.promise;
7970
8042
  }
7971
8043
  }));
7972
8044
  });
@@ -7975,16 +8047,17 @@ enifed('ember-glimmer/tests/integration/application/engine-test', ['ember-babel'
7975
8047
  _this17.assertText('Application');
7976
8048
  var transition = _this17.transitionTo('blog.post');
7977
8049
 
7978
- _this17.runTaskNext(function () {
8050
+ loadingEntered.promise.then(function () {
7979
8051
  _this17.assertText('ApplicationEngineLoading');
7980
- resolveLoading();
7981
- });
8052
+ resolveLoading.resolve();
7982
8053
 
7983
- return transition.then(function () {
7984
8054
  _this17.runTaskNext(function () {
7985
- return _this17.assertText('ApplicationEnginePost');
8055
+ _this17.assertText('ApplicationEnginePost');
8056
+ done();
7986
8057
  });
7987
8058
  });
8059
+
8060
+ return transition;
7988
8061
  });
7989
8062
  };
7990
8063
 
@@ -8031,20 +8104,25 @@ enifed('ember-glimmer/tests/integration/application/engine-test', ['ember-babel'
8031
8104
  var _this19 = this;
8032
8105
 
8033
8106
  assert.expect(3);
8107
+ var done = assert.async();
8034
8108
 
8035
- var resolveLoading = void 0;
8109
+ var loadingEntered = _emberRuntime.RSVP.defer();
8110
+ var resolveLoading = _emberRuntime.RSVP.defer();
8036
8111
 
8037
8112
  this.setupAppAndRoutableEngine();
8038
8113
  this.additionalEngineRegistrations(function () {
8039
8114
  this.register('template:post', (0, _helpers.compile)('{{outlet}}'));
8040
8115
  this.register('template:post.comments', (0, _helpers.compile)('Comments'));
8116
+ this.register('route:post.loading', _emberRouting.Route.extend({
8117
+ activate: function () {
8118
+ _emberMetal.run.next(loadingEntered.resolve);
8119
+ }
8120
+ }));
8041
8121
  this.register('template:post.loading', (0, _helpers.compile)('Loading'));
8042
8122
  this.register('template:post.likes', (0, _helpers.compile)('Likes'));
8043
8123
  this.register('route:post.likes', _emberRouting.Route.extend({
8044
8124
  model: function () {
8045
- return new _emberRuntime.RSVP.Promise(function (resolve) {
8046
- resolveLoading = resolve;
8047
- });
8125
+ return resolveLoading.promise;
8048
8126
  }
8049
8127
  }));
8050
8128
  });
@@ -8053,16 +8131,17 @@ enifed('ember-glimmer/tests/integration/application/engine-test', ['ember-babel'
8053
8131
  _this19.assertText('ApplicationEngineComments');
8054
8132
  var transition = _this19.transitionTo('blog.post.likes');
8055
8133
 
8056
- _this19.runTaskNext(function () {
8134
+ loadingEntered.promise.then(function () {
8057
8135
  _this19.assertText('ApplicationEngineLoading');
8058
- resolveLoading();
8059
- });
8136
+ resolveLoading.resolve();
8060
8137
 
8061
- return transition.then(function () {
8062
8138
  _this19.runTaskNext(function () {
8063
- return _this19.assertText('ApplicationEngineLikes');
8139
+ _this19.assertText('ApplicationEngineLikes');
8140
+ done();
8064
8141
  });
8065
8142
  });
8143
+
8144
+ return transition;
8066
8145
  });
8067
8146
  };
8068
8147
 
@@ -8105,6 +8184,76 @@ enifed('ember-glimmer/tests/integration/application/engine-test', ['ember-babel'
8105
8184
  });
8106
8185
  };
8107
8186
 
8187
+ _class.prototype['@test visit() routable engine which errors on init'] = function (assert) {
8188
+ var _this22 = this;
8189
+
8190
+ assert.expect(1);
8191
+
8192
+ this.additionalEngineRegistrations(function () {
8193
+ this.register('route:application', _emberRouting.Route.extend({
8194
+ init: function () {
8195
+ throw new Error('Whoops! Something went wrong...');
8196
+ }
8197
+ }));
8198
+ });
8199
+
8200
+ this.setupAppAndRoutableEngine([]);
8201
+
8202
+ return this.visit('/', { shouldRender: true }).then(function () {
8203
+ return _this22.visit('/blog');
8204
+ }).catch(function (error) {
8205
+ assert.equal(error.message, 'Whoops! Something went wrong...');
8206
+ });
8207
+ };
8208
+
8209
+ (0, _emberBabel.createClass)(_class, [{
8210
+ key: 'routerOptions',
8211
+ get: function () {
8212
+ this.assert;
8213
+
8214
+
8215
+ return {
8216
+ location: 'none',
8217
+
8218
+ _getHandlerFunction: function () {
8219
+ var _this23 = this;
8220
+
8221
+ var syncHandler = this._super.apply(this, arguments);
8222
+ this._enginePromises = Object.create(null);
8223
+ this._resolvedEngines = Object.create(null);
8224
+
8225
+ return function (name) {
8226
+ var engineInfo = _this23._engineInfoByRoute[name];
8227
+ if (!engineInfo) {
8228
+ return syncHandler(name);
8229
+ }
8230
+
8231
+ var engineName = engineInfo.name;
8232
+ if (_this23._resolvedEngines[engineName]) {
8233
+ return syncHandler(name);
8234
+ }
8235
+
8236
+ var enginePromise = _this23._enginePromises[engineName];
8237
+
8238
+ if (!enginePromise) {
8239
+ enginePromise = new _emberRuntime.RSVP.Promise(function (resolve) {
8240
+ setTimeout(function () {
8241
+ _this23._resolvedEngines[engineName] = true;
8242
+
8243
+ resolve();
8244
+ }, 1);
8245
+ });
8246
+ _this23._enginePromises[engineName] = enginePromise;
8247
+ }
8248
+
8249
+ return enginePromise.then(function () {
8250
+ return syncHandler(name);
8251
+ });
8252
+ };
8253
+ }
8254
+ };
8255
+ }
8256
+ }]);
8108
8257
  return _class;
8109
8258
  }(_testCase.ApplicationTest));
8110
8259
  });
@@ -16458,102 +16607,6 @@ enifed('ember-glimmer/tests/integration/components/dynamic-components-test', ['e
16458
16607
  return _class;
16459
16608
  }(_testCase.RenderingTest));
16460
16609
  });
16461
- 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) {
16462
- 'use strict';
16463
-
16464
- (0, _testCase.moduleFor)('Errors thrown during render', function (_RenderingTest) {
16465
- (0, _emberBabel.inherits)(_class, _RenderingTest);
16466
-
16467
- function _class() {
16468
- return (0, _emberBabel.possibleConstructorReturn)(this, _RenderingTest.apply(this, arguments));
16469
- }
16470
-
16471
- _class.prototype['@test it can recover resets the transaction when an error is thrown during initial render'] = function (assert) {
16472
- var _this2 = this;
16473
-
16474
- var shouldThrow = true;
16475
- var FooBarComponent = _helpers.Component.extend({
16476
- init: function () {
16477
- this._super.apply(this, arguments);
16478
- if (shouldThrow) {
16479
- throw new Error('silly mistake in init!');
16480
- }
16481
- }
16482
- });
16483
-
16484
- this.registerComponent('foo-bar', { ComponentClass: FooBarComponent, template: 'hello' });
16485
-
16486
- assert.throws(function () {
16487
- _this2.render('{{#if switch}}{{#foo-bar}}{{foo-bar}}{{/foo-bar}}{{/if}}', { switch: true });
16488
- }, /silly mistake in init/);
16489
-
16490
- assert.equal(this.env.inTransaction, false, 'should not be in a transaction even though an error was thrown');
16491
-
16492
- this.assertText('');
16493
-
16494
- this.runTask(function () {
16495
- return (0, _emberMetal.set)(_this2.context, 'switch', false);
16496
- });
16497
-
16498
- shouldThrow = false;
16499
-
16500
- this.runTask(function () {
16501
- return (0, _emberMetal.set)(_this2.context, 'switch', true);
16502
- });
16503
-
16504
- this.assertText('hello');
16505
- };
16506
-
16507
- _class.prototype['@test it can recover resets the transaction when an error is thrown during rerender'] = function (assert) {
16508
- var _this3 = this;
16509
-
16510
- var shouldThrow = false;
16511
- var FooBarComponent = _helpers.Component.extend({
16512
- init: function () {
16513
- this._super.apply(this, arguments);
16514
- if (shouldThrow) {
16515
- throw new Error('silly mistake in init!');
16516
- }
16517
- }
16518
- });
16519
-
16520
- this.registerComponent('foo-bar', { ComponentClass: FooBarComponent, template: 'hello' });
16521
-
16522
- this.render('{{#if switch}}{{#foo-bar}}{{foo-bar}}{{/foo-bar}}{{/if}}', { switch: true });
16523
-
16524
- this.assertText('hello');
16525
-
16526
- this.runTask(function () {
16527
- return (0, _emberMetal.set)(_this3.context, 'switch', false);
16528
- });
16529
-
16530
- shouldThrow = true;
16531
-
16532
- assert.throws(function () {
16533
- _this3.runTask(function () {
16534
- return (0, _emberMetal.set)(_this3.context, 'switch', true);
16535
- });
16536
- }, /silly mistake in init/);
16537
-
16538
- assert.equal(this.env.inTransaction, false, 'should not be in a transaction even though an error was thrown');
16539
-
16540
- this.assertText('');
16541
-
16542
- this.runTask(function () {
16543
- return (0, _emberMetal.set)(_this3.context, 'switch', false);
16544
- });
16545
- shouldThrow = false;
16546
-
16547
- this.runTask(function () {
16548
- return (0, _emberMetal.set)(_this3.context, 'switch', true);
16549
- });
16550
-
16551
- this.assertText('hello');
16552
- };
16553
-
16554
- return _class;
16555
- }(_testCase.RenderingTest));
16556
- });
16557
16610
  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) {
16558
16611
  'use strict';
16559
16612
 
@@ -28358,16 +28411,10 @@ enifed('ember-glimmer/tests/integration/helpers/partial-test', ['ember-babel', '
28358
28411
  _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}}']),
28359
28412
  _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}}']),
28360
28413
  _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}}']),
28361
- _templateObject5 = (0, _emberBabel.taggedTemplateLiteralLoose)(['\n [outer: {{name}}] {{partial \'inner-partial\'}}\n '], ['\n [outer: {{name}}] {{partial \'inner-partial\'}}\n ']),
28362
- _templateObject6 = (0, _emberBabel.taggedTemplateLiteralLoose)(['\n {{#each names as |name i|}}\n {{i}}: {{partial \'outer-partial\'}}\n {{/each}}'], ['\n {{#each names as |name i|}}\n {{i}}: {{partial \'outer-partial\'}}\n {{/each}}']),
28363
- _templateObject7 = (0, _emberBabel.taggedTemplateLiteralLoose)(['\n {{#with \'Ben\' as |person2|}}\n Hi {{person1}} (aged {{age}}) and {{person2}}. {{partial \'person3-partial\'}}\n {{/with}}\n '], ['\n {{#with \'Ben\' as |person2|}}\n Hi {{person1}} (aged {{age}}) and {{person2}}. {{partial \'person3-partial\'}}\n {{/with}}\n ']),
28364
- _templateObject8 = (0, _emberBabel.taggedTemplateLiteralLoose)(['\n {{#with \'Alex\' as |person3|}}\n Hi {{person1}} (aged {{age}}), {{person2}} and {{person3}}. {{partial \'person4-partial\'}}\n {{/with}}\n '], ['\n {{#with \'Alex\' as |person3|}}\n Hi {{person1}} (aged {{age}}), {{person2}} and {{person3}}. {{partial \'person4-partial\'}}\n {{/with}}\n ']),
28365
- _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 ']),
28366
- _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}}']),
28367
- _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}}']),
28368
- _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}}']),
28369
- _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 ']),
28370
- _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}}']);
28414
+ _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}}']),
28415
+ _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}}']),
28416
+ _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 ']),
28417
+ _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}}']);
28371
28418
 
28372
28419
  (0, _testCase.moduleFor)('Helpers test: {{partial}}', function (_RenderingTest) {
28373
28420
  (0, _emberBabel.inherits)(_class, _RenderingTest);
@@ -28572,69 +28619,13 @@ enifed('ember-glimmer/tests/integration/helpers/partial-test', ['ember-babel', '
28572
28619
  this.assertText('apple: apple |: |orange: orange |banana: banana |');
28573
28620
  };
28574
28621
 
28575
- _class.prototype['@test nested partials using data from {{#each}}'] = function () {
28576
- var _this8 = this;
28577
-
28578
- this.registerPartial('_outer-partial', (0, _abstractTestCase.strip)(_templateObject5));
28579
-
28580
- this.registerPartial('inner-partial', '[inner: {{name}}]');
28581
-
28582
- this.render((0, _abstractTestCase.strip)(_templateObject6), {
28583
- names: (0, _emberRuntime.A)(['Alex', 'Ben'])
28584
- });
28585
-
28586
- this.assertStableRerender();
28587
-
28588
- this.assertText('0: [outer: Alex] [inner: Alex]1: [outer: Ben] [inner: Ben]');
28589
-
28590
- this.runTask(function () {
28591
- return _this8.context.names.pushObject('Sophie');
28592
- });
28593
-
28594
- this.assertText('0: [outer: Alex] [inner: Alex]1: [outer: Ben] [inner: Ben]2: [outer: Sophie] [inner: Sophie]');
28595
-
28596
- this.runTask(function () {
28597
- return (0, _emberMetal.set)(_this8.context, 'names', (0, _emberRuntime.A)(['Alex', 'Ben']));
28598
- });
28599
-
28600
- this.assertText('0: [outer: Alex] [inner: Alex]1: [outer: Ben] [inner: Ben]');
28601
- };
28602
-
28603
- _class.prototype['@test nested partials within nested `{{#with}}` blocks'] = function () {
28604
- var _this9 = this;
28605
-
28606
- this.registerPartial('_person2-partial', (0, _abstractTestCase.strip)(_templateObject7));
28607
-
28608
- this.registerPartial('_person3-partial', (0, _abstractTestCase.strip)(_templateObject8));
28609
-
28610
- this.registerPartial('_person4-partial', (0, _abstractTestCase.strip)(_templateObject9));
28611
-
28612
- this.render((0, _abstractTestCase.strip)(_templateObject10), { age: 0 });
28613
-
28614
- this.assertStableRerender();
28615
-
28616
- 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.');
28617
-
28618
- this.runTask(function () {
28619
- return (0, _emberMetal.set)(_this9.context, 'age', 1);
28620
- });
28621
-
28622
- 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.');
28623
-
28624
- this.runTask(function () {
28625
- return (0, _emberMetal.set)(_this9.context, 'age', 0);
28626
- });
28627
-
28628
- 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.');
28629
- };
28630
-
28631
28622
  _class.prototype['@test dynamic partials in {{#each}}'] = function () {
28632
- var _this10 = this;
28623
+ var _this8 = this;
28633
28624
 
28634
28625
  this.registerPartial('_odd', 'ODD{{i}}');
28635
28626
  this.registerPartial('_even', 'EVEN{{i}}');
28636
28627
 
28637
- this.render((0, _abstractTestCase.strip)(_templateObject11), {
28628
+ this.render((0, _abstractTestCase.strip)(_templateObject5), {
28638
28629
  model: {
28639
28630
  items: ['even', 'odd', 'even', 'odd'],
28640
28631
  type: 'number'
@@ -28646,13 +28637,13 @@ enifed('ember-glimmer/tests/integration/helpers/partial-test', ['ember-babel', '
28646
28637
  this.assertText('number: EVEN0number: ODD1number: EVEN2number: ODD3');
28647
28638
 
28648
28639
  this.runTask(function () {
28649
- return (0, _emberMetal.set)(_this10.context, 'model.type', 'integer');
28640
+ return (0, _emberMetal.set)(_this8.context, 'model.type', 'integer');
28650
28641
  });
28651
28642
 
28652
28643
  this.assertText('integer: EVEN0integer: ODD1integer: EVEN2integer: ODD3');
28653
28644
 
28654
28645
  this.runTask(function () {
28655
- return (0, _emberMetal.set)(_this10.context, 'model', {
28646
+ return (0, _emberMetal.set)(_this8.context, 'model', {
28656
28647
  items: ['even', 'odd', 'even', 'odd'],
28657
28648
  type: 'number'
28658
28649
  });
@@ -28662,11 +28653,11 @@ enifed('ember-glimmer/tests/integration/helpers/partial-test', ['ember-babel', '
28662
28653
  };
28663
28654
 
28664
28655
  _class.prototype['@test dynamic partials in {{#with}}'] = function () {
28665
- var _this11 = this;
28656
+ var _this9 = this;
28666
28657
 
28667
28658
  this.registerPartial('_thing', '{{t}}');
28668
28659
 
28669
- this.render((0, _abstractTestCase.strip)(_templateObject12), {
28660
+ this.render((0, _abstractTestCase.strip)(_templateObject6), {
28670
28661
  item: { thing: false }
28671
28662
  });
28672
28663
 
@@ -28675,20 +28666,20 @@ enifed('ember-glimmer/tests/integration/helpers/partial-test', ['ember-babel', '
28675
28666
  this.assertText('Nothing!');
28676
28667
 
28677
28668
  this.runTask(function () {
28678
- return (0, _emberMetal.set)(_this11.context, 'item.thing', 'thing');
28669
+ return (0, _emberMetal.set)(_this9.context, 'item.thing', 'thing');
28679
28670
  });
28680
28671
 
28681
28672
  this.assertText('thing');
28682
28673
 
28683
28674
  this.runTask(function () {
28684
- return (0, _emberMetal.set)(_this11.context, 'item', { thing: false });
28675
+ return (0, _emberMetal.set)(_this9.context, 'item', { thing: false });
28685
28676
  });
28686
28677
 
28687
28678
  this.assertText('Nothing!');
28688
28679
  };
28689
28680
 
28690
28681
  _class.prototype['@test partials which contain contextual components'] = function () {
28691
- var _this12 = this;
28682
+ var _this10 = this;
28692
28683
 
28693
28684
  this.registerComponent('outer-component', {
28694
28685
  template: '{{yield (hash inner=(component "inner-component" name=name))}}'
@@ -28698,22 +28689,22 @@ enifed('ember-glimmer/tests/integration/helpers/partial-test', ['ember-babel', '
28698
28689
  template: '{{yield (hash name=name)}}'
28699
28690
  });
28700
28691
 
28701
- this.registerPartial('_some-partial', (0, _abstractTestCase.strip)(_templateObject13));
28692
+ this.registerPartial('_some-partial', (0, _abstractTestCase.strip)(_templateObject7));
28702
28693
 
28703
- this.render((0, _abstractTestCase.strip)(_templateObject14), { name: 'Sophie' });
28694
+ this.render((0, _abstractTestCase.strip)(_templateObject8), { name: 'Sophie' });
28704
28695
 
28705
28696
  this.assertStableRerender();
28706
28697
 
28707
28698
  this.assertText('inner.name: Sophie');
28708
28699
 
28709
28700
  this.runTask(function () {
28710
- return (0, _emberMetal.set)(_this12.context, 'name', 'Ben');
28701
+ return (0, _emberMetal.set)(_this10.context, 'name', 'Ben');
28711
28702
  });
28712
28703
 
28713
28704
  this.assertText('inner.name: Ben');
28714
28705
 
28715
28706
  this.runTask(function () {
28716
- return (0, _emberMetal.set)(_this12.context, 'name', 'Sophie');
28707
+ return (0, _emberMetal.set)(_this10.context, 'name', 'Sophie');
28717
28708
  });
28718
28709
 
28719
28710
  this.assertText('inner.name: Sophie');
@@ -39578,19 +39569,19 @@ enifed('ember-metal/tests/map_test', ['ember-metal'], function (_emberMetal) {
39578
39569
  });
39579
39570
 
39580
39571
  QUnit.test('forEach without proper callback', function () {
39581
- QUnit.throws(function () {
39572
+ expectAssertion(function () {
39582
39573
  map.forEach();
39583
39574
  }, '[object Undefined] is not a function');
39584
39575
 
39585
- QUnit.throws(function () {
39576
+ expectAssertion(function () {
39586
39577
  map.forEach(undefined);
39587
39578
  }, '[object Undefined] is not a function');
39588
39579
 
39589
- QUnit.throws(function () {
39580
+ expectAssertion(function () {
39590
39581
  map.forEach(1);
39591
39582
  }, '[object Number] is not a function');
39592
39583
 
39593
- QUnit.throws(function () {
39584
+ expectAssertion(function () {
39594
39585
  map.forEach({});
39595
39586
  }, '[object Object] is not a function');
39596
39587
 
@@ -39599,7 +39590,7 @@ enifed('ember-metal/tests/map_test', ['ember-metal'], function (_emberMetal) {
39599
39590
  });
39600
39591
  // ensure the error happens even if no data is present
39601
39592
  equal(map.size, 0);
39602
- QUnit.throws(function () {
39593
+ expectAssertion(function () {
39603
39594
  map.forEach({});
39604
39595
  }, '[object Object] is not a function');
39605
39596
  });
@@ -39811,13 +39802,6 @@ enifed('ember-metal/tests/map_test', ['ember-metal'], function (_emberMetal) {
39811
39802
  equal(map.constructor, _emberMetal.Map);
39812
39803
  });
39813
39804
 
39814
- QUnit.test('Map() without `new`', function () {
39815
- QUnit.throws(function () {
39816
- // jshint newcap:false
39817
- (0, _emberMetal.Map)();
39818
- }, /Constructor Map requires 'new'/);
39819
- });
39820
-
39821
39805
  QUnit.test('MapWithDefault.prototype.constructor', function () {
39822
39806
  var map = new _emberMetal.MapWithDefault({
39823
39807
  defaultValue: function (key) {
@@ -39866,13 +39850,6 @@ enifed('ember-metal/tests/map_test', ['ember-metal'], function (_emberMetal) {
39866
39850
  }
39867
39851
  });
39868
39852
 
39869
- QUnit.test('OrderedSet() without `new`', function () {
39870
- QUnit.throws(function () {
39871
- // jshint newcap:false
39872
- (0, _emberMetal.OrderedSet)();
39873
- }, /Constructor OrderedSet requires 'new'/);
39874
- });
39875
-
39876
39853
  QUnit.test('add returns the set', function () {
39877
39854
  var obj = {};
39878
39855
  equal(map.add(obj), map);
@@ -43905,7 +43882,7 @@ enifed('ember-metal/tests/watching/watch_test', ['ember-environment', 'ember-met
43905
43882
  equal(meta_objB.peekWatching('foo'), 1, 'should be watching foo');
43906
43883
  equal(meta_objB.readableChainWatchers().has('foo', chainNode), true, 'should have chain watcher');
43907
43884
 
43908
- (0, _emberMetal.destroy)(objA);
43885
+ (0, _emberMetal.deleteMeta)(objA);
43909
43886
 
43910
43887
  equal(meta_objB.peekWatching('foo'), 0, 'should not be watching foo');
43911
43888
  equal(meta_objB.readableChainWatchers().has('foo', chainNode), false, 'should not have chain watcher');
@@ -49244,15 +49221,6 @@ enifed('ember-runtime/tests/inject_test', ['ember-metal', 'ember-runtime/inject'
49244
49221
  }, /Attempting to inject an unknown injection: 'bar:baz'/);
49245
49222
  });
49246
49223
  }
49247
-
49248
- QUnit.test('factories should return a list of lazy injection full names', function () {
49249
- var AnObject = _object.default.extend({
49250
- foo: new _emberMetal.InjectedProperty('foo', 'bar'),
49251
- bar: new _emberMetal.InjectedProperty('quux')
49252
- });
49253
-
49254
- deepEqual(AnObject._lazyInjections(), { 'foo': 'foo:bar', 'bar': 'quux:bar' }, 'should return injected container keys');
49255
- });
49256
49224
  });
49257
49225
  enifed('ember-runtime/tests/legacy_1x/mixins/observable/chained_test', ['ember-metal', 'ember-runtime/system/object', 'ember-runtime/system/native_array'], function (_emberMetal, _object, _native_array) {
49258
49226
  'use strict';
@@ -58904,68 +58872,24 @@ enifed('ember-runtime/tests/system/string/camelize_test', ['ember-environment',
58904
58872
  });
58905
58873
  }
58906
58874
 
58907
- QUnit.test('camelize normal string', function () {
58908
- deepEqual((0, _string.camelize)('my favorite items'), 'myFavoriteItems');
58909
- if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
58910
- deepEqual('my favorite items'.camelize(), 'myFavoriteItems');
58911
- }
58912
- });
58913
-
58914
- QUnit.test('camelize capitalized string', function () {
58915
- deepEqual((0, _string.camelize)('I Love Ramen'), 'iLoveRamen');
58916
- if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
58917
- deepEqual('I Love Ramen'.camelize(), 'iLoveRamen');
58918
- }
58919
- });
58920
-
58921
- QUnit.test('camelize dasherized string', function () {
58922
- deepEqual((0, _string.camelize)('css-class-name'), 'cssClassName');
58923
- if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
58924
- deepEqual('css-class-name'.camelize(), 'cssClassName');
58925
- }
58926
- });
58927
-
58928
- QUnit.test('camelize underscored string', function () {
58929
- deepEqual((0, _string.camelize)('action_name'), 'actionName');
58930
- if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
58931
- deepEqual('action_name'.camelize(), 'actionName');
58932
- }
58933
- });
58934
-
58935
- QUnit.test('camelize dot notation string', function () {
58936
- deepEqual((0, _string.camelize)('action.name'), 'actionName');
58937
- if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
58938
- deepEqual('action.name'.camelize(), 'actionName');
58939
- }
58940
- });
58941
-
58942
- QUnit.test('does nothing with camelcased string', function () {
58943
- deepEqual((0, _string.camelize)('innerHTML'), 'innerHTML');
58944
- if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
58945
- deepEqual('innerHTML'.camelize(), 'innerHTML');
58946
- }
58947
- });
58948
-
58949
- QUnit.test('camelize namespaced classified string', function () {
58950
- deepEqual((0, _string.camelize)('PrivateDocs/OwnerInvoice'), 'privateDocs/ownerInvoice');
58951
- if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
58952
- deepEqual('PrivateDocs/OwnerInvoice'.camelize(), 'privateDocs/ownerInvoice');
58953
- }
58954
- });
58955
-
58956
- QUnit.test('camelize namespaced underscored string', function () {
58957
- deepEqual((0, _string.camelize)('private_docs/owner_invoice'), 'privateDocs/ownerInvoice');
58958
- if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
58959
- deepEqual('private_docs/owner_invoice'.camelize(), 'privateDocs/ownerInvoice');
58960
- }
58961
- });
58875
+ function test(given, expected, description) {
58876
+ QUnit.test(description, function () {
58877
+ deepEqual((0, _string.camelize)(given), expected);
58878
+ if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
58879
+ deepEqual(given.camelize(), expected);
58880
+ }
58881
+ });
58882
+ }
58962
58883
 
58963
- QUnit.test('camelize namespaced dasherized string', function () {
58964
- deepEqual((0, _string.camelize)('private-docs/owner-invoice'), 'privateDocs/ownerInvoice');
58965
- if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
58966
- deepEqual('private-docs/owner-invoice'.camelize(), 'privateDocs/ownerInvoice');
58967
- }
58968
- });
58884
+ test('my favorite items', 'myFavoriteItems', 'camelize normal string');
58885
+ test('I Love Ramen', 'iLoveRamen', 'camelize capitalized string');
58886
+ test('css-class-name', 'cssClassName', 'camelize dasherized string');
58887
+ test('action_name', 'actionName', 'camelize underscored string');
58888
+ test('action.name', 'actionName', 'camelize dot notation string');
58889
+ test('innerHTML', 'innerHTML', 'does nothing with camelcased string');
58890
+ test('PrivateDocs/OwnerInvoice', 'privateDocs/ownerInvoice', 'camelize namespaced classified string');
58891
+ test('private_docs/owner_invoice', 'privateDocs/ownerInvoice', 'camelize namespaced underscored string');
58892
+ test('private-docs/owner-invoice', 'privateDocs/ownerInvoice', 'camelize namespaced dasherized string');
58969
58893
  });
58970
58894
  enifed('ember-runtime/tests/system/string/capitalize_test', ['ember-environment', 'ember-runtime/system/string'], function (_emberEnvironment, _string) {
58971
58895
  'use strict';
@@ -58978,68 +58902,24 @@ enifed('ember-runtime/tests/system/string/capitalize_test', ['ember-environment'
58978
58902
  });
58979
58903
  }
58980
58904
 
58981
- QUnit.test('capitalize normal string', function () {
58982
- deepEqual((0, _string.capitalize)('my favorite items'), 'My favorite items');
58983
- if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
58984
- deepEqual('my favorite items'.capitalize(), 'My favorite items');
58985
- }
58986
- });
58987
-
58988
- QUnit.test('capitalize dasherized string', function () {
58989
- deepEqual((0, _string.capitalize)('css-class-name'), 'Css-class-name');
58990
- if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
58991
- deepEqual('css-class-name'.capitalize(), 'Css-class-name');
58992
- }
58993
- });
58994
-
58995
- QUnit.test('capitalize underscored string', function () {
58996
- deepEqual((0, _string.capitalize)('action_name'), 'Action_name');
58997
- if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
58998
- deepEqual('action_name'.capitalize(), 'Action_name');
58999
- }
59000
- });
59001
-
59002
- QUnit.test('capitalize camelcased string', function () {
59003
- deepEqual((0, _string.capitalize)('innerHTML'), 'InnerHTML');
59004
- if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
59005
- deepEqual('innerHTML'.capitalize(), 'InnerHTML');
59006
- }
59007
- });
59008
-
59009
- QUnit.test('does nothing with capitalized string', function () {
59010
- deepEqual((0, _string.capitalize)('Capitalized string'), 'Capitalized string');
59011
- if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
59012
- deepEqual('Capitalized string'.capitalize(), 'Capitalized string');
59013
- }
59014
- });
59015
-
59016
- QUnit.test('capitalize namespaced camelized string', function () {
59017
- deepEqual((0, _string.capitalize)('privateDocs/ownerInvoice'), 'PrivateDocs/OwnerInvoice');
59018
- if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
59019
- deepEqual('privateDocs/ownerInvoice'.capitalize(), 'PrivateDocs/OwnerInvoice');
59020
- }
59021
- });
59022
-
59023
- QUnit.test('capitalize namespaced underscored string', function () {
59024
- deepEqual((0, _string.capitalize)('private_docs/owner_invoice'), 'Private_docs/Owner_invoice');
59025
- if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
59026
- deepEqual('private_docs/owner_invoice'.capitalize(), 'Private_docs/Owner_invoice');
59027
- }
59028
- });
59029
-
59030
- QUnit.test('capitalize namespaced dasherized string', function () {
59031
- deepEqual((0, _string.capitalize)('private-docs/owner-invoice'), 'Private-docs/Owner-invoice');
59032
- if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
59033
- deepEqual('private-docs/owner-invoice'.capitalize(), 'Private-docs/Owner-invoice');
59034
- }
59035
- });
58905
+ function test(given, expected, description) {
58906
+ QUnit.test(description, function () {
58907
+ deepEqual((0, _string.capitalize)(given), expected);
58908
+ if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
58909
+ deepEqual(given.capitalize(), expected);
58910
+ }
58911
+ });
58912
+ }
59036
58913
 
59037
- QUnit.test('capitalize string with accent character', function () {
59038
- deepEqual((0, _string.capitalize)('šabc'), 'Šabc');
59039
- if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
59040
- deepEqual('šabc'.capitalize(), 'Šabc');
59041
- }
59042
- });
58914
+ test('my favorite items', 'My favorite items', 'capitalize normal string');
58915
+ test('css-class-name', 'Css-class-name', 'capitalize dasherized string');
58916
+ test('action_name', 'Action_name', 'capitalize underscored string');
58917
+ test('innerHTML', 'InnerHTML', 'capitalize camelcased string');
58918
+ test('Capitalized string', 'Capitalized string', 'does nothing with capitalized string');
58919
+ test('privateDocs/ownerInvoice', 'PrivateDocs/OwnerInvoice', 'capitalize namespaced camelized string');
58920
+ test('private_docs/owner_invoice', 'Private_docs/Owner_invoice', 'capitalize namespaced underscored string');
58921
+ test('private-docs/owner-invoice', 'Private-docs/Owner-invoice', 'capitalize namespaced dasherized string');
58922
+ test('šabc', 'Šabc', 'capitalize string with accent character');
59043
58923
  });
59044
58924
  enifed('ember-runtime/tests/system/string/classify_test', ['ember-environment', 'ember-runtime/system/string'], function (_emberEnvironment, _string) {
59045
58925
  'use strict';
@@ -59088,61 +58968,23 @@ enifed('ember-runtime/tests/system/string/dasherize_test', ['ember-environment',
59088
58968
  });
59089
58969
  }
59090
58970
 
59091
- QUnit.test('dasherize normal string', function () {
59092
- deepEqual((0, _string.dasherize)('my favorite items'), 'my-favorite-items');
59093
- if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
59094
- deepEqual('my favorite items'.dasherize(), 'my-favorite-items');
59095
- }
59096
- });
59097
-
59098
- QUnit.test('does nothing with dasherized string', function () {
59099
- deepEqual((0, _string.dasherize)('css-class-name'), 'css-class-name');
59100
- if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
59101
- deepEqual('css-class-name'.dasherize(), 'css-class-name');
59102
- }
59103
- });
59104
-
59105
- QUnit.test('dasherize underscored string', function () {
59106
- deepEqual((0, _string.dasherize)('action_name'), 'action-name');
59107
- if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
59108
- deepEqual('action_name'.dasherize(), 'action-name');
59109
- }
59110
- });
59111
-
59112
- QUnit.test('dasherize camelcased string', function () {
59113
- deepEqual((0, _string.dasherize)('innerHTML'), 'inner-html');
59114
- if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
59115
- deepEqual('innerHTML'.dasherize(), 'inner-html');
59116
- }
59117
- });
59118
-
59119
- QUnit.test('dasherize string that is the property name of Object.prototype', function () {
59120
- deepEqual((0, _string.dasherize)('toString'), 'to-string');
59121
- if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
59122
- deepEqual('toString'.dasherize(), 'to-string');
59123
- }
59124
- });
59125
-
59126
- QUnit.test('dasherize namespaced classified string', function () {
59127
- deepEqual((0, _string.dasherize)('PrivateDocs/OwnerInvoice'), 'private-docs/owner-invoice');
59128
- if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
59129
- deepEqual('PrivateDocs/OwnerInvoice'.dasherize(), 'private-docs/owner-invoice');
59130
- }
59131
- });
59132
-
59133
- QUnit.test('dasherize namespaced camelized string', function () {
59134
- deepEqual((0, _string.dasherize)('privateDocs/ownerInvoice'), 'private-docs/owner-invoice');
59135
- if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
59136
- deepEqual('privateDocs/ownerInvoice'.dasherize(), 'private-docs/owner-invoice');
59137
- }
59138
- });
58971
+ function test(given, expected, description) {
58972
+ QUnit.test(description, function () {
58973
+ deepEqual((0, _string.dasherize)(given), expected);
58974
+ if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
58975
+ deepEqual(given.dasherize(), expected);
58976
+ }
58977
+ });
58978
+ }
59139
58979
 
59140
- QUnit.test('dasherize namespaced underscored string', function () {
59141
- deepEqual((0, _string.dasherize)('private_docs/owner_invoice'), 'private-docs/owner-invoice');
59142
- if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
59143
- deepEqual('private_docs/owner_invoice'.dasherize(), 'private-docs/owner-invoice');
59144
- }
59145
- });
58980
+ test('my favorite items', 'my-favorite-items', 'dasherize normal string');
58981
+ test('css-class-name', 'css-class-name', 'does nothing with dasherized string');
58982
+ test('action_name', 'action-name', 'dasherize underscored string');
58983
+ test('innerHTML', 'inner-html', 'dasherize camelcased string');
58984
+ test('toString', 'to-string', 'dasherize string that is the property name of Object.prototype');
58985
+ test('PrivateDocs/OwnerInvoice', 'private-docs/owner-invoice', 'dasherize namespaced classified string');
58986
+ test('privateDocs/ownerInvoice', 'private-docs/owner-invoice', 'dasherize namespaced camelized string');
58987
+ test('private_docs/owner_invoice', 'private-docs/owner-invoice', 'dasherize namespaced underscored string');
59146
58988
  });
59147
58989
  enifed('ember-runtime/tests/system/string/decamelize_test', ['ember-environment', 'ember-runtime/system/string'], function (_emberEnvironment, _string) {
59148
58990
  'use strict';
@@ -59155,54 +58997,22 @@ enifed('ember-runtime/tests/system/string/decamelize_test', ['ember-environment'
59155
58997
  });
59156
58998
  }
59157
58999
 
59158
- QUnit.test('does nothing with normal string', function () {
59159
- deepEqual((0, _string.decamelize)('my favorite items'), 'my favorite items');
59160
- if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
59161
- deepEqual('my favorite items'.decamelize(), 'my favorite items');
59162
- }
59163
- });
59164
-
59165
- QUnit.test('does nothing with dasherized string', function () {
59166
- deepEqual((0, _string.decamelize)('css-class-name'), 'css-class-name');
59167
- if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
59168
- deepEqual('css-class-name'.decamelize(), 'css-class-name');
59169
- }
59170
- });
59171
-
59172
- QUnit.test('does nothing with underscored string', function () {
59173
- deepEqual((0, _string.decamelize)('action_name'), 'action_name');
59174
- if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
59175
- deepEqual('action_name'.decamelize(), 'action_name');
59176
- }
59177
- });
59178
-
59179
- QUnit.test('converts a camelized string into all lower case separated by underscores.', function () {
59180
- deepEqual((0, _string.decamelize)('innerHTML'), 'inner_html');
59181
- if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
59182
- deepEqual('innerHTML'.decamelize(), 'inner_html');
59183
- }
59184
- });
59185
-
59186
- QUnit.test('decamelizes strings with numbers', function () {
59187
- deepEqual((0, _string.decamelize)('size160Url'), 'size160_url');
59188
- if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
59189
- deepEqual('size160Url'.decamelize(), 'size160_url');
59190
- }
59191
- });
59192
-
59193
- QUnit.test('decamelize namespaced classified string', function () {
59194
- deepEqual((0, _string.decamelize)('PrivateDocs/OwnerInvoice'), 'private_docs/owner_invoice');
59195
- if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
59196
- deepEqual('PrivateDocs/OwnerInvoice'.decamelize(), 'private_docs/owner_invoice');
59197
- }
59198
- });
59000
+ function test(given, expected, description) {
59001
+ QUnit.test(description, function () {
59002
+ deepEqual((0, _string.decamelize)(given), expected);
59003
+ if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
59004
+ deepEqual(given.decamelize(), expected);
59005
+ }
59006
+ });
59007
+ }
59199
59008
 
59200
- QUnit.test('decamelize namespaced camelized string', function () {
59201
- deepEqual((0, _string.decamelize)('privateDocs/ownerInvoice'), 'private_docs/owner_invoice');
59202
- if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
59203
- deepEqual('privateDocs/ownerInvoice'.decamelize(), 'private_docs/owner_invoice');
59204
- }
59205
- });
59009
+ test('my favorite items', 'my favorite items', 'does nothing with normal string');
59010
+ test('css-class-name', 'css-class-name', 'does nothing with dasherized string');
59011
+ test('action_name', 'action_name', 'does nothing with underscored string');
59012
+ test('innerHTML', 'inner_html', 'converts a camelized string into all lower case separated by underscores.');
59013
+ test('size160Url', 'size160_url', 'decamelizes strings with numbers');
59014
+ test('PrivateDocs/OwnerInvoice', 'private_docs/owner_invoice', 'decamelize namespaced classified string');
59015
+ test('privateDocs/ownerInvoice', 'private_docs/owner_invoice', 'decamelize namespaced camelized string');
59206
59016
  });
59207
59017
  enifed('ember-runtime/tests/system/string/fmt_string_test', ['ember-environment', 'ember-runtime/system/string'], function (_emberEnvironment, _string) {
59208
59018
  'use strict';
@@ -59215,38 +59025,20 @@ enifed('ember-runtime/tests/system/string/fmt_string_test', ['ember-environment'
59215
59025
  });
59216
59026
  }
59217
59027
 
59218
- QUnit.test('\'Hello %@ %@\'.fmt(\'John\', \'Doe\') => \'Hello John Doe\'', function () {
59219
- expectDeprecation('Ember.String.fmt is deprecated, use ES6 template strings instead.');
59220
- equal((0, _string.fmt)('Hello %@ %@', ['John', 'Doe']), 'Hello John Doe');
59221
- if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
59222
- equal('Hello %@ %@'.fmt('John', 'Doe'), 'Hello John Doe');
59223
- }
59224
- });
59225
-
59226
- QUnit.test('\'Hello %@2 %@1\'.fmt(\'John\', \'Doe\') => \'Hello Doe John\'', function () {
59227
- expectDeprecation('Ember.String.fmt is deprecated, use ES6 template strings instead.');
59228
- equal((0, _string.fmt)('Hello %@2 %@1', ['John', 'Doe']), 'Hello Doe John');
59229
- if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
59230
- equal('Hello %@2 %@1'.fmt('John', 'Doe'), 'Hello Doe John');
59231
- }
59232
- });
59233
-
59234
- 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 () {
59235
- expectDeprecation('Ember.String.fmt is deprecated, use ES6 template strings instead.');
59236
- 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');
59237
-
59238
- if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
59239
- 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');
59240
- }
59241
- });
59028
+ function test(given, args, expected, description) {
59029
+ QUnit.test(description, function () {
59030
+ expectDeprecation('Ember.String.fmt is deprecated, use ES6 template strings instead.');
59031
+ equal((0, _string.fmt)(given, args), expected);
59032
+ if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
59033
+ equal(given.fmt.apply(given, args), expected);
59034
+ }
59035
+ });
59036
+ }
59242
59037
 
59243
- QUnit.test('\'data: %@\'.fmt({ id: 3 }) => \'data: {id: 3}\'', function () {
59244
- expectDeprecation('Ember.String.fmt is deprecated, use ES6 template strings instead.');
59245
- equal((0, _string.fmt)('data: %@', [{ id: 3 }]), 'data: {id: 3}');
59246
- if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
59247
- equal('data: %@'.fmt({ id: 3 }), 'data: {id: 3}');
59248
- }
59249
- });
59038
+ test('Hello %@ %@', ['John', 'Doe'], 'Hello John Doe', 'fmt(\'Hello %@ %@\', [\'John\', \'Doe\']) => \'Hello John Doe\'');
59039
+ test('Hello %@2 %@1', ['John', 'Doe'], 'Hello Doe John', 'fmt(\'Hello %@2 %@1\', [\'John\', \'Doe\']) => \'Hello Doe John\'');
59040
+ 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\'');
59041
+ test('data: %@', [{ id: 3 }], 'data: {id: 3}', 'fmt(\'data: %@\', [{ id: 3 }]) => \'data: {id: 3}\'');
59250
59042
 
59251
59043
  QUnit.test('works with argument form', function () {
59252
59044
  expectDeprecation('Ember.String.fmt is deprecated, use ES6 template strings instead.');
@@ -59282,33 +59074,19 @@ enifed('ember-runtime/tests/system/string/loc_test', ['ember-metal', 'ember-envi
59282
59074
  });
59283
59075
  }
59284
59076
 
59285
- QUnit.test('\'_Hello World\'.loc() => \'Bonjour le monde\'', function () {
59286
- equal((0, _string.loc)('_Hello World'), 'Bonjour le monde');
59287
- if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
59288
- equal('_Hello World'.loc(), 'Bonjour le monde');
59289
- }
59290
- });
59291
-
59292
- QUnit.test('\'_Hello %@ %@\'.loc(\'John\', \'Doe\') => \'Bonjour John Doe\'', function () {
59293
- equal((0, _string.loc)('_Hello %@ %@', ['John', 'Doe']), 'Bonjour John Doe');
59294
- if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
59295
- equal('_Hello %@ %@'.loc('John', 'Doe'), 'Bonjour John Doe');
59296
- }
59297
- });
59298
-
59299
- QUnit.test('\'_Hello %@# %@#\'.loc(\'John\', \'Doe\') => \'Bonjour Doe John\'', function () {
59300
- equal((0, _string.loc)('_Hello %@# %@#', ['John', 'Doe']), 'Bonjour Doe John');
59301
- if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
59302
- equal('_Hello %@# %@#'.loc('John', 'Doe'), 'Bonjour Doe John');
59303
- }
59304
- });
59077
+ function test(given, args, expected, description) {
59078
+ QUnit.test(description, function () {
59079
+ equal((0, _string.loc)(given, args), expected);
59080
+ if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
59081
+ equal(given.loc.apply(given, args), expected);
59082
+ }
59083
+ });
59084
+ }
59305
59085
 
59306
- QUnit.test('\'_Not In Strings\'.loc() => \'_Not In Strings\'', function () {
59307
- equal((0, _string.loc)('_Not In Strings'), '_Not In Strings');
59308
- if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
59309
- equal('_Not In Strings'.loc(), '_Not In Strings');
59310
- }
59311
- });
59086
+ test('_Hello World', [], 'Bonjour le monde', 'loc(\'_Hello World\') => \'Bonjour le monde\'');
59087
+ test('_Hello %@ %@', ['John', 'Doe'], 'Bonjour John Doe', 'loc(\'_Hello %@ %@\', [\'John\', \'Doe\']) => \'Bonjour John Doe\'');
59088
+ test('_Hello %@# %@#', ['John', 'Doe'], 'Bonjour Doe John', 'loc(\'_Hello %@# %@#\', [\'John\', \'Doe\']) => \'Bonjour Doe John\'');
59089
+ test('_Not In Strings', [], '_Not In Strings', 'loc(\'_Not In Strings\') => \'_Not In Strings\'');
59312
59090
 
59313
59091
  QUnit.test('works with argument form', function () {
59314
59092
  equal((0, _string.loc)('_Hello %@', 'John'), 'Bonjour John');
@@ -59326,54 +59104,22 @@ enifed('ember-runtime/tests/system/string/underscore_test', ['ember-environment'
59326
59104
  });
59327
59105
  }
59328
59106
 
59329
- QUnit.test('with normal string', function () {
59330
- deepEqual((0, _string.underscore)('my favorite items'), 'my_favorite_items');
59331
- if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
59332
- deepEqual('my favorite items'.underscore(), 'my_favorite_items');
59333
- }
59334
- });
59335
-
59336
- QUnit.test('with dasherized string', function () {
59337
- deepEqual((0, _string.underscore)('css-class-name'), 'css_class_name');
59338
- if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
59339
- deepEqual('css-class-name'.underscore(), 'css_class_name');
59340
- }
59341
- });
59342
-
59343
- QUnit.test('does nothing with underscored string', function () {
59344
- deepEqual((0, _string.underscore)('action_name'), 'action_name');
59345
- if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
59346
- deepEqual('action_name'.underscore(), 'action_name');
59347
- }
59348
- });
59349
-
59350
- QUnit.test('with camelcased string', function () {
59351
- deepEqual((0, _string.underscore)('innerHTML'), 'inner_html');
59352
- if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
59353
- deepEqual('innerHTML'.underscore(), 'inner_html');
59354
- }
59355
- });
59356
-
59357
- QUnit.test('underscore namespaced classified string', function () {
59358
- deepEqual((0, _string.underscore)('PrivateDocs/OwnerInvoice'), 'private_docs/owner_invoice');
59359
- if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
59360
- deepEqual('PrivateDocs/OwnerInvoice'.underscore(), 'private_docs/owner_invoice');
59361
- }
59362
- });
59363
-
59364
- QUnit.test('underscore namespaced camelized string', function () {
59365
- deepEqual((0, _string.underscore)('privateDocs/ownerInvoice'), 'private_docs/owner_invoice');
59366
- if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
59367
- deepEqual('privateDocs/ownerInvoice'.underscore(), 'private_docs/owner_invoice');
59368
- }
59369
- });
59107
+ function test(given, expected, description) {
59108
+ QUnit.test(description, function () {
59109
+ deepEqual((0, _string.underscore)(given), expected);
59110
+ if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
59111
+ deepEqual(given.underscore(), expected);
59112
+ }
59113
+ });
59114
+ }
59370
59115
 
59371
- QUnit.test('underscore namespaced dasherized string', function () {
59372
- deepEqual((0, _string.underscore)('private-docs/owner-invoice'), 'private_docs/owner_invoice');
59373
- if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
59374
- deepEqual('private-docs/owner-invoice'.underscore(), 'private_docs/owner_invoice');
59375
- }
59376
- });
59116
+ test('my favorite items', 'my_favorite_items', 'with normal string');
59117
+ test('css-class-name', 'css_class_name', 'with dasherized string');
59118
+ test('action_name', 'action_name', 'does nothing with underscored string');
59119
+ test('innerHTML', 'inner_html', 'with camelcased string');
59120
+ test('PrivateDocs/OwnerInvoice', 'private_docs/owner_invoice', 'underscore namespaced classified string');
59121
+ test('privateDocs/ownerInvoice', 'private_docs/owner_invoice', 'underscore namespaced camelized string');
59122
+ test('private-docs/owner-invoice', 'private_docs/owner_invoice', 'underscore namespaced dasherized string');
59377
59123
  });
59378
59124
  enifed('ember-runtime/tests/system/string/w_test', ['ember-environment', 'ember-runtime/system/string'], function (_emberEnvironment, _string) {
59379
59125
  'use strict';
@@ -59386,26 +59132,18 @@ enifed('ember-runtime/tests/system/string/w_test', ['ember-environment', 'ember-
59386
59132
  });
59387
59133
  }
59388
59134
 
59389
- QUnit.test('\'one two three\'.w() => [\'one\',\'two\',\'three\']', function () {
59390
- deepEqual((0, _string.w)('one two three'), ['one', 'two', 'three']);
59391
- if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
59392
- deepEqual('one two three'.w(), ['one', 'two', 'three']);
59393
- }
59394
- });
59395
-
59396
- QUnit.test('\'one two three\'.w() with extra spaces between words => [\'one\',\'two\',\'three\']', function () {
59397
- deepEqual((0, _string.w)('one two three'), ['one', 'two', 'three']);
59398
- if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
59399
- deepEqual('one two three'.w(), ['one', 'two', 'three']);
59400
- }
59401
- });
59135
+ function test(given, expected, description) {
59136
+ QUnit.test(description, function () {
59137
+ deepEqual((0, _string.w)(given), expected);
59138
+ if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
59139
+ deepEqual(given.w(), expected);
59140
+ }
59141
+ });
59142
+ }
59402
59143
 
59403
- QUnit.test('\'one two three\'.w() with tabs', function () {
59404
- deepEqual((0, _string.w)('one\ttwo three'), ['one', 'two', 'three']);
59405
- if (_emberEnvironment.ENV.EXTEND_PROTOTYPES.String) {
59406
- deepEqual('one\ttwo three'.w(), ['one', 'two', 'three']);
59407
- }
59408
- });
59144
+ test('one two three', ['one', 'two', 'three'], 'w(\'one two three\') => [\'one\',\'two\',\'three\']');
59145
+ test('one two three', ['one', 'two', 'three'], 'w(\'one two three\') with extra spaces between words => [\'one\',\'two\',\'three\']');
59146
+ test('one\ttwo three', ['one', 'two', 'three'], 'w(\'one two three\') with tabs');
59409
59147
  });
59410
59148
  enifed('ember-template-compiler/compat', ['ember-metal', 'ember-template-compiler/system/precompile', 'ember-template-compiler/system/compile', 'ember-template-compiler/system/compile-options'], function (_emberMetal, _precompile, _compile, _compileOptions) {
59411
59149
  'use strict';
@@ -60638,7 +60376,7 @@ enifed('ember-template-compiler/system/compile-options', ['exports', 'ember-util
60638
60376
 
60639
60377
  exports.default = compileOptions;
60640
60378
  exports.registerPlugin = registerPlugin;
60641
- exports.unregisterPlugin = unregisterPlugin;
60379
+ exports.removePlugin = removePlugin;
60642
60380
 
60643
60381
 
60644
60382
  var USER_PLUGINS = [];
@@ -60656,73 +60394,51 @@ enifed('ember-template-compiler/system/compile-options', ['exports', 'ember-util
60656
60394
  options.plugins = { ast: [].concat(USER_PLUGINS, _plugins.default) };
60657
60395
  } else {
60658
60396
  var potententialPugins = [].concat(USER_PLUGINS, _plugins.default);
60659
- var providedPlugins = options.plugins.ast.map(function (plugin) {
60660
- return wrapLegacyPluginIfNeeded(plugin);
60661
- });
60662
60397
  var pluginsToAdd = potententialPugins.filter(function (plugin) {
60663
60398
  return options.plugins.ast.indexOf(plugin) === -1;
60664
60399
  });
60665
- options.plugins.ast = providedPlugins.concat(pluginsToAdd);
60400
+ options.plugins.ast = options.plugins.ast.slice().concat(pluginsToAdd);
60666
60401
  }
60667
60402
 
60668
60403
  return options;
60669
60404
  }
60670
60405
 
60671
- function wrapLegacyPluginIfNeeded(_plugin) {
60672
- var plugin = _plugin;
60406
+ function registerPlugin(type, _plugin) {
60407
+ if (type !== 'ast') {
60408
+ throw new Error('Attempting to register ' + _plugin + ' as "' + type + '" which is not a valid Glimmer plugin type.');
60409
+ }
60410
+
60411
+ var plugin = void 0;
60673
60412
  if (_plugin.prototype && _plugin.prototype.transform) {
60674
60413
  plugin = function (env) {
60675
- var pluginInstantiated = false;
60676
-
60677
60414
  return {
60678
60415
  name: _plugin.constructor && _plugin.constructor.name,
60679
60416
 
60680
60417
  visitors: {
60681
60418
  Program: function (node) {
60682
- if (!pluginInstantiated) {
60683
-
60684
- pluginInstantiated = true;
60685
- var _plugin2 = new _plugin(env);
60419
+ var plugin = new _plugin(env);
60686
60420
 
60687
- _plugin2.syntax = env.syntax;
60421
+ plugin.syntax = env.syntax;
60688
60422
 
60689
- return _plugin2.transform(node);
60690
- }
60423
+ return plugin.transform(node);
60691
60424
  }
60692
60425
  }
60693
60426
  };
60694
60427
  };
60695
-
60696
- plugin.__raw = _plugin;
60697
- }
60698
-
60699
- return plugin;
60700
- }
60701
-
60702
- function registerPlugin(type, _plugin) {
60703
- if (type !== 'ast') {
60704
- throw new Error('Attempting to register ' + _plugin + ' as "' + type + '" which is not a valid Glimmer plugin type.');
60705
- }
60706
-
60707
- for (var i = 0; i < USER_PLUGINS.length; i++) {
60708
- var PLUGIN = USER_PLUGINS[i];
60709
- if (PLUGIN === _plugin || PLUGIN.__raw === _plugin) {
60710
- return;
60711
- }
60428
+ } else {
60429
+ plugin = _plugin;
60712
60430
  }
60713
60431
 
60714
- var plugin = wrapLegacyPluginIfNeeded(_plugin);
60715
-
60716
60432
  USER_PLUGINS = [plugin].concat(USER_PLUGINS);
60717
60433
  }
60718
60434
 
60719
- function unregisterPlugin(type, PluginClass) {
60435
+ function removePlugin(type, PluginClass) {
60720
60436
  if (type !== 'ast') {
60721
60437
  throw new Error('Attempting to unregister ' + PluginClass + ' as "' + type + '" which is not a valid Glimmer plugin type.');
60722
60438
  }
60723
60439
 
60724
60440
  USER_PLUGINS = USER_PLUGINS.filter(function (plugin) {
60725
- return plugin !== PluginClass && plugin.__raw !== PluginClass;
60441
+ return plugin !== PluginClass;
60726
60442
  });
60727
60443
  }
60728
60444
  });
@@ -63287,6 +63003,12 @@ enifed('ember-utils/tests/can_invoke_test', ['ember-utils'], function (_emberUti
63287
63003
  equal((0, _emberUtils.canInvoke)(undefined, 'aMethodThatDoesNotExist'), false);
63288
63004
  });
63289
63005
 
63006
+ QUnit.test('should return true for falsy values that have methods', function () {
63007
+ equal((0, _emberUtils.canInvoke)(false, 'valueOf'), true);
63008
+ equal((0, _emberUtils.canInvoke)('', 'charAt'), true);
63009
+ equal((0, _emberUtils.canInvoke)(0, 'toFixed'), true);
63010
+ });
63011
+
63290
63012
  QUnit.test('should return true if the method exists on the object', function () {
63291
63013
  equal((0, _emberUtils.canInvoke)(obj, 'aMethodThatExists'), true);
63292
63014
  });
@@ -65719,11 +65441,13 @@ enifed('ember/tests/helpers/link_to_test/link_to_transitioning_classes_test', ['
65719
65441
 
65720
65442
  _this2.aboutDefer = _emberRuntime.RSVP.defer();
65721
65443
  _this2.otherDefer = _emberRuntime.RSVP.defer();
65444
+ _this2.newsDefer = _emberRuntime.RSVP.defer();
65722
65445
  var _this = _this2;
65723
65446
 
65724
65447
  _this2.router.map(function () {
65725
65448
  this.route('about');
65726
65449
  this.route('other');
65450
+ this.route('news');
65727
65451
  });
65728
65452
 
65729
65453
  _this2.add('route:about', _emberRouting.Route.extend({
@@ -65738,7 +65462,13 @@ enifed('ember/tests/helpers/link_to_test/link_to_transitioning_classes_test', ['
65738
65462
  }
65739
65463
  }));
65740
65464
 
65741
- _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 ');
65465
+ _this2.add('route:news', _emberRouting.Route.extend({
65466
+ model: function () {
65467
+ return _this.newsDefer.promise;
65468
+ }
65469
+ }));
65470
+
65471
+ _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 ');
65742
65472
 
65743
65473
  _this2.visit('/');
65744
65474
  return _this2;
@@ -65748,6 +65478,7 @@ enifed('ember/tests/helpers/link_to_test/link_to_transitioning_classes_test', ['
65748
65478
  _ApplicationTestCase.prototype.teardown.call(this);
65749
65479
  this.aboutDefer = null;
65750
65480
  this.otherDefer = null;
65481
+ this.newsDefer = null;
65751
65482
  };
65752
65483
 
65753
65484
  _class.prototype['@test while a transition is underway'] = function (assert) {
@@ -65788,6 +65519,44 @@ enifed('ember/tests/helpers/link_to_test/link_to_transitioning_classes_test', ['
65788
65519
  assertHasNoClass(assert, $other, 'ember-transitioning-out');
65789
65520
  };
65790
65521
 
65522
+ _class.prototype['@test while a transition is underway with activeClass is false'] = function (assert) {
65523
+ var _this4 = this;
65524
+
65525
+ var $index = this.$('#index-link');
65526
+ var $news = this.$('#news-link');
65527
+ var $other = this.$('#other-link');
65528
+
65529
+ $news.click();
65530
+
65531
+ assertHasClass(assert, $index, 'active');
65532
+ assertHasNoClass(assert, $news, 'active');
65533
+ assertHasNoClass(assert, $other, 'active');
65534
+
65535
+ assertHasNoClass(assert, $index, 'ember-transitioning-in');
65536
+ assertHasClass(assert, $news, 'ember-transitioning-in');
65537
+ assertHasNoClass(assert, $other, 'ember-transitioning-in');
65538
+
65539
+ assertHasClass(assert, $index, 'ember-transitioning-out');
65540
+ assertHasNoClass(assert, $news, 'ember-transitioning-out');
65541
+ assertHasNoClass(assert, $other, 'ember-transitioning-out');
65542
+
65543
+ this.runTask(function () {
65544
+ return _this4.newsDefer.resolve();
65545
+ });
65546
+
65547
+ assertHasNoClass(assert, $index, 'active');
65548
+ assertHasNoClass(assert, $news, 'active');
65549
+ assertHasNoClass(assert, $other, 'active');
65550
+
65551
+ assertHasNoClass(assert, $index, 'ember-transitioning-in');
65552
+ assertHasNoClass(assert, $news, 'ember-transitioning-in');
65553
+ assertHasNoClass(assert, $other, 'ember-transitioning-in');
65554
+
65555
+ assertHasNoClass(assert, $index, 'ember-transitioning-out');
65556
+ assertHasNoClass(assert, $news, 'ember-transitioning-out');
65557
+ assertHasNoClass(assert, $other, 'ember-transitioning-out');
65558
+ };
65559
+
65791
65560
  return _class;
65792
65561
  }(_internalTestHelpers.ApplicationTestCase));
65793
65562
 
@@ -65796,51 +65565,51 @@ enifed('ember/tests/helpers/link_to_test/link_to_transitioning_classes_test', ['
65796
65565
 
65797
65566
  function _class2() {
65798
65567
 
65799
- var _this4 = (0, _emberBabel.possibleConstructorReturn)(this, _ApplicationTestCase2.call(this));
65568
+ var _this5 = (0, _emberBabel.possibleConstructorReturn)(this, _ApplicationTestCase2.call(this));
65800
65569
 
65801
- _this4.aboutDefer = _emberRuntime.RSVP.defer();
65802
- _this4.otherDefer = _emberRuntime.RSVP.defer();
65803
- var _this = _this4;
65570
+ _this5.aboutDefer = _emberRuntime.RSVP.defer();
65571
+ _this5.otherDefer = _emberRuntime.RSVP.defer();
65572
+ var _this = _this5;
65804
65573
 
65805
- _this4.router.map(function () {
65574
+ _this5.router.map(function () {
65806
65575
  this.route('parent-route', function () {
65807
65576
  this.route('about');
65808
65577
  this.route('other');
65809
65578
  });
65810
65579
  });
65811
- _this4.add('route:parent-route.about', _emberRouting.Route.extend({
65580
+ _this5.add('route:parent-route.about', _emberRouting.Route.extend({
65812
65581
  model: function () {
65813
65582
  return _this.aboutDefer.promise;
65814
65583
  }
65815
65584
  }));
65816
65585
 
65817
- _this4.add('route:parent-route.other', _emberRouting.Route.extend({
65586
+ _this5.add('route:parent-route.other', _emberRouting.Route.extend({
65818
65587
  model: function () {
65819
65588
  return _this.otherDefer.promise;
65820
65589
  }
65821
65590
  }));
65822
65591
 
65823
- _this4.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 ');
65592
+ _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 ');
65824
65593
 
65825
- _this4.visit('/');
65826
- return _this4;
65594
+ _this5.visit('/');
65595
+ return _this5;
65827
65596
  }
65828
65597
 
65829
65598
  _class2.prototype.resolveAbout = function () {
65830
- var _this5 = this;
65599
+ var _this6 = this;
65831
65600
 
65832
65601
  return this.runTask(function () {
65833
- _this5.aboutDefer.resolve();
65834
- _this5.aboutDefer = _emberRuntime.RSVP.defer();
65602
+ _this6.aboutDefer.resolve();
65603
+ _this6.aboutDefer = _emberRuntime.RSVP.defer();
65835
65604
  });
65836
65605
  };
65837
65606
 
65838
65607
  _class2.prototype.resolveOther = function () {
65839
- var _this6 = this;
65608
+ var _this7 = this;
65840
65609
 
65841
65610
  return this.runTask(function () {
65842
- _this6.otherDefer.resolve();
65843
- _this6.otherDefer = _emberRuntime.RSVP.defer();
65611
+ _this7.otherDefer.resolve();
65612
+ _this7.otherDefer = _emberRuntime.RSVP.defer();
65844
65613
  });
65845
65614
  };
65846
65615
 
@@ -66657,7 +66426,7 @@ enifed('ember/tests/reexports_test', ['ember/index', 'internal-test-helpers'], f
66657
66426
  ['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' }],
66658
66427
  // ['create'], TODO: figure out what to do here
66659
66428
  // ['keys'], TODO: figure out what to do here
66660
- ['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'],
66429
+ ['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'],
66661
66430
 
66662
66431
  // ember-views
66663
66432
  ['$', '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'],