ember-source 2.12.2 → 2.13.0.beta.1

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.12.2
9
+ * @version 2.13.0-beta.1
10
10
  */
11
11
 
12
12
  var enifed, requireModule, Ember;
@@ -184,569 +184,6 @@ var babelHelpers = {
184
184
  defaults: defaults
185
185
  };
186
186
 
187
- enifed('ember-debug/deprecate', ['exports', 'ember-metal', 'ember-console', 'ember-environment', 'ember-debug/handlers'], function (exports, _emberMetal, _emberConsole, _emberEnvironment, _emberDebugHandlers) {
188
- /*global __fail__*/
189
-
190
- 'use strict';
191
-
192
- exports.registerHandler = registerHandler;
193
- exports.default = deprecate;
194
-
195
- function registerHandler(handler) {
196
- _emberDebugHandlers.registerHandler('deprecate', handler);
197
- }
198
-
199
- function formatMessage(_message, options) {
200
- var message = _message;
201
-
202
- if (options && options.id) {
203
- message = message + (' [deprecation id: ' + options.id + ']');
204
- }
205
-
206
- if (options && options.url) {
207
- message += ' See ' + options.url + ' for more details.';
208
- }
209
-
210
- return message;
211
- }
212
-
213
- registerHandler(function logDeprecationToConsole(message, options) {
214
- var updatedMessage = formatMessage(message, options);
215
-
216
- _emberConsole.default.warn('DEPRECATION: ' + updatedMessage);
217
- });
218
-
219
- var captureErrorForStack = undefined;
220
-
221
- if (new Error().stack) {
222
- captureErrorForStack = function () {
223
- return new Error();
224
- };
225
- } else {
226
- captureErrorForStack = function () {
227
- try {
228
- __fail__.fail();
229
- } catch (e) {
230
- return e;
231
- }
232
- };
233
- }
234
-
235
- registerHandler(function logDeprecationStackTrace(message, options, next) {
236
- if (_emberEnvironment.ENV.LOG_STACKTRACE_ON_DEPRECATION) {
237
- var stackStr = '';
238
- var error = captureErrorForStack();
239
- var stack = undefined;
240
-
241
- if (error.stack) {
242
- if (error['arguments']) {
243
- // Chrome
244
- stack = error.stack.replace(/^\s+at\s+/gm, '').replace(/^([^\(]+?)([\n$])/gm, '{anonymous}($1)$2').replace(/^Object.<anonymous>\s*\(([^\)]+)\)/gm, '{anonymous}($1)').split('\n');
245
- stack.shift();
246
- } else {
247
- // Firefox
248
- stack = error.stack.replace(/(?:\n@:0)?\s+$/m, '').replace(/^\(/gm, '{anonymous}(').split('\n');
249
- }
250
-
251
- stackStr = '\n ' + stack.slice(2).join('\n ');
252
- }
253
-
254
- var updatedMessage = formatMessage(message, options);
255
-
256
- _emberConsole.default.warn('DEPRECATION: ' + updatedMessage + stackStr);
257
- } else {
258
- next.apply(undefined, arguments);
259
- }
260
- });
261
-
262
- registerHandler(function raiseOnDeprecation(message, options, next) {
263
- if (_emberEnvironment.ENV.RAISE_ON_DEPRECATION) {
264
- var updatedMessage = formatMessage(message);
265
-
266
- throw new _emberMetal.Error(updatedMessage);
267
- } else {
268
- next.apply(undefined, arguments);
269
- }
270
- });
271
-
272
- var missingOptionsDeprecation = 'When calling `Ember.deprecate` you ' + 'must provide an `options` hash as the third parameter. ' + '`options` should include `id` and `until` properties.';
273
- exports.missingOptionsDeprecation = missingOptionsDeprecation;
274
- var missingOptionsIdDeprecation = 'When calling `Ember.deprecate` you must provide `id` in options.';
275
- exports.missingOptionsIdDeprecation = missingOptionsIdDeprecation;
276
- var missingOptionsUntilDeprecation = 'When calling `Ember.deprecate` you must provide `until` in options.';
277
-
278
- exports.missingOptionsUntilDeprecation = missingOptionsUntilDeprecation;
279
- /**
280
- @module ember
281
- @submodule ember-debug
282
- */
283
-
284
- /**
285
- Display a deprecation warning with the provided message and a stack trace
286
- (Chrome and Firefox only).
287
-
288
- * In a production build, this method is defined as an empty function (NOP).
289
- Uses of this method in Ember itself are stripped from the ember.prod.js build.
290
-
291
- @method deprecate
292
- @param {String} message A description of the deprecation.
293
- @param {Boolean} test A boolean. If falsy, the deprecation will be displayed.
294
- @param {Object} options
295
- @param {String} options.id A unique id for this deprecation. The id can be
296
- used by Ember debugging tools to change the behavior (raise, log or silence)
297
- for that specific deprecation. The id should be namespaced by dots, e.g.
298
- "view.helper.select".
299
- @param {string} options.until The version of Ember when this deprecation
300
- warning will be removed.
301
- @param {String} [options.url] An optional url to the transition guide on the
302
- emberjs.com website.
303
- @for Ember
304
- @public
305
- @since 1.0.0
306
- */
307
-
308
- function deprecate(message, test, options) {
309
- if (!options || !options.id && !options.until) {
310
- deprecate(missingOptionsDeprecation, false, {
311
- id: 'ember-debug.deprecate-options-missing',
312
- until: '3.0.0',
313
- url: 'http://emberjs.com/deprecations/v2.x/#toc_ember-debug-function-options'
314
- });
315
- }
316
-
317
- if (options && !options.id) {
318
- deprecate(missingOptionsIdDeprecation, false, {
319
- id: 'ember-debug.deprecate-id-missing',
320
- until: '3.0.0',
321
- url: 'http://emberjs.com/deprecations/v2.x/#toc_ember-debug-function-options'
322
- });
323
- }
324
-
325
- if (options && !options.until) {
326
- deprecate(missingOptionsUntilDeprecation, options && options.until, {
327
- id: 'ember-debug.deprecate-until-missing',
328
- until: '3.0.0',
329
- url: 'http://emberjs.com/deprecations/v2.x/#toc_ember-debug-function-options'
330
- });
331
- }
332
-
333
- _emberDebugHandlers.invoke.apply(undefined, ['deprecate'].concat(babelHelpers.slice.call(arguments)));
334
- }
335
- });
336
- enifed("ember-debug/handlers", ["exports"], function (exports) {
337
- "use strict";
338
-
339
- exports.registerHandler = registerHandler;
340
- exports.invoke = invoke;
341
- var HANDLERS = {};
342
-
343
- exports.HANDLERS = HANDLERS;
344
-
345
- function registerHandler(type, callback) {
346
- var nextHandler = HANDLERS[type] || function () {};
347
-
348
- HANDLERS[type] = function (message, options) {
349
- callback(message, options, nextHandler);
350
- };
351
- }
352
-
353
- function invoke(type, message, test, options) {
354
- if (test) {
355
- return;
356
- }
357
-
358
- var handlerForType = HANDLERS[type];
359
-
360
- if (!handlerForType) {
361
- return;
362
- }
363
-
364
- if (handlerForType) {
365
- handlerForType(message, options);
366
- }
367
- }
368
- });
369
- enifed('ember-debug/index', ['exports', 'ember-metal', 'ember-environment', 'ember-console', 'ember-debug/deprecate', 'ember-debug/warn'], function (exports, _emberMetal, _emberEnvironment, _emberConsole, _emberDebugDeprecate, _emberDebugWarn) {
370
- 'use strict';
371
-
372
- exports._warnIfUsingStrippedFeatureFlags = _warnIfUsingStrippedFeatureFlags;
373
-
374
- /**
375
- @module ember
376
- @submodule ember-debug
377
- */
378
-
379
- /**
380
- @class Ember
381
- @public
382
- */
383
-
384
- /**
385
- Define an assertion that will throw an exception if the condition is not met.
386
-
387
- * In a production build, this method is defined as an empty function (NOP).
388
- Uses of this method in Ember itself are stripped from the ember.prod.js build.
389
-
390
- ```javascript
391
- // Test for truthiness
392
- Ember.assert('Must pass a valid object', obj);
393
-
394
- // Fail unconditionally
395
- Ember.assert('This code path should never be run');
396
- ```
397
-
398
- @method assert
399
- @param {String} desc A description of the assertion. This will become
400
- the text of the Error thrown if the assertion fails.
401
- @param {Boolean} test Must be truthy for the assertion to pass. If
402
- falsy, an exception will be thrown.
403
- @public
404
- @since 1.0.0
405
- */
406
- _emberMetal.setDebugFunction('assert', function assert(desc, test) {
407
- if (!test) {
408
- throw new _emberMetal.Error('Assertion Failed: ' + desc);
409
- }
410
- });
411
-
412
- /**
413
- Display a debug notice.
414
-
415
- * In a production build, this method is defined as an empty function (NOP).
416
- Uses of this method in Ember itself are stripped from the ember.prod.js build.
417
-
418
- ```javascript
419
- Ember.debug('I\'m a debug notice!');
420
- ```
421
-
422
- @method debug
423
- @param {String} message A debug message to display.
424
- @public
425
- */
426
- _emberMetal.setDebugFunction('debug', function debug(message) {
427
- _emberConsole.default.debug('DEBUG: ' + message);
428
- });
429
-
430
- /**
431
- Display an info notice.
432
-
433
- * In a production build, this method is defined as an empty function (NOP).
434
- Uses of this method in Ember itself are stripped from the ember.prod.js build.
435
-
436
- @method info
437
- @private
438
- */
439
- _emberMetal.setDebugFunction('info', function info() {
440
- _emberConsole.default.info.apply(undefined, arguments);
441
- });
442
-
443
- /**
444
- Alias an old, deprecated method with its new counterpart.
445
-
446
- Display a deprecation warning with the provided message and a stack trace
447
- (Chrome and Firefox only) when the assigned method is called.
448
-
449
- * In a production build, this method is defined as an empty function (NOP).
450
-
451
- ```javascript
452
- Ember.oldMethod = Ember.deprecateFunc('Please use the new, updated method', Ember.newMethod);
453
- ```
454
-
455
- @method deprecateFunc
456
- @param {String} message A description of the deprecation.
457
- @param {Object} [options] The options object for Ember.deprecate.
458
- @param {Function} func The new function called to replace its deprecated counterpart.
459
- @return {Function} A new function that wraps the original function with a deprecation warning
460
- @private
461
- */
462
- _emberMetal.setDebugFunction('deprecateFunc', function deprecateFunc() {
463
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
464
- args[_key] = arguments[_key];
465
- }
466
-
467
- if (args.length === 3) {
468
- var _ret = (function () {
469
- var message = args[0];
470
- var options = args[1];
471
- var func = args[2];
472
-
473
- return {
474
- v: function () {
475
- _emberMetal.deprecate(message, false, options);
476
- return func.apply(this, arguments);
477
- }
478
- };
479
- })();
480
-
481
- if (typeof _ret === 'object') return _ret.v;
482
- } else {
483
- var _ret2 = (function () {
484
- var message = args[0];
485
- var func = args[1];
486
-
487
- return {
488
- v: function () {
489
- _emberMetal.deprecate(message);
490
- return func.apply(this, arguments);
491
- }
492
- };
493
- })();
494
-
495
- if (typeof _ret2 === 'object') return _ret2.v;
496
- }
497
- });
498
-
499
- /**
500
- Run a function meant for debugging.
501
-
502
- * In a production build, this method is defined as an empty function (NOP).
503
- Uses of this method in Ember itself are stripped from the ember.prod.js build.
504
-
505
- ```javascript
506
- Ember.runInDebug(() => {
507
- Ember.Component.reopen({
508
- didInsertElement() {
509
- console.log("I'm happy");
510
- }
511
- });
512
- });
513
- ```
514
-
515
- @method runInDebug
516
- @param {Function} func The function to be executed.
517
- @since 1.5.0
518
- @public
519
- */
520
- _emberMetal.setDebugFunction('runInDebug', function runInDebug(func) {
521
- func();
522
- });
523
-
524
- _emberMetal.setDebugFunction('debugSeal', function debugSeal(obj) {
525
- Object.seal(obj);
526
- });
527
-
528
- _emberMetal.setDebugFunction('debugFreeze', function debugFreeze(obj) {
529
- Object.freeze(obj);
530
- });
531
-
532
- _emberMetal.setDebugFunction('deprecate', _emberDebugDeprecate.default);
533
-
534
- _emberMetal.setDebugFunction('warn', _emberDebugWarn.default);
535
-
536
- /**
537
- Will call `Ember.warn()` if ENABLE_OPTIONAL_FEATURES or
538
- any specific FEATURES flag is truthy.
539
-
540
- This method is called automatically in debug canary builds.
541
-
542
- @private
543
- @method _warnIfUsingStrippedFeatureFlags
544
- @return {void}
545
- */
546
-
547
- function _warnIfUsingStrippedFeatureFlags(FEATURES, knownFeatures, featuresWereStripped) {
548
- if (featuresWereStripped) {
549
- _emberMetal.warn('Ember.ENV.ENABLE_OPTIONAL_FEATURES is only available in canary builds.', !_emberEnvironment.ENV.ENABLE_OPTIONAL_FEATURES, { id: 'ember-debug.feature-flag-with-features-stripped' });
550
-
551
- var keys = Object.keys(FEATURES || {});
552
- for (var i = 0; i < keys.length; i++) {
553
- var key = keys[i];
554
- if (key === 'isEnabled' || !(key in knownFeatures)) {
555
- continue;
556
- }
557
-
558
- _emberMetal.warn('FEATURE["' + key + '"] is set as enabled, but FEATURE flags are only available in canary builds.', !FEATURES[key], { id: 'ember-debug.feature-flag-with-features-stripped' });
559
- }
560
- }
561
- }
562
-
563
- if (!_emberMetal.isTesting()) {
564
- (function () {
565
- // Complain if they're using FEATURE flags in builds other than canary
566
- _emberMetal.FEATURES['features-stripped-test'] = true;
567
- var featuresWereStripped = true;
568
-
569
- if (false) {
570
- featuresWereStripped = false;
571
- }
572
-
573
- delete _emberMetal.FEATURES['features-stripped-test'];
574
- _warnIfUsingStrippedFeatureFlags(_emberEnvironment.ENV.FEATURES, _emberMetal.DEFAULT_FEATURES, featuresWereStripped);
575
-
576
- // Inform the developer about the Ember Inspector if not installed.
577
- var isFirefox = _emberEnvironment.environment.isFirefox;
578
- var isChrome = _emberEnvironment.environment.isChrome;
579
-
580
- if (typeof window !== 'undefined' && (isFirefox || isChrome) && window.addEventListener) {
581
- window.addEventListener('load', function () {
582
- if (document.documentElement && document.documentElement.dataset && !document.documentElement.dataset.emberExtension) {
583
- var downloadURL = undefined;
584
-
585
- if (isChrome) {
586
- downloadURL = 'https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi';
587
- } else if (isFirefox) {
588
- downloadURL = 'https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/';
589
- }
590
-
591
- _emberMetal.debug('For more advanced debugging, install the Ember Inspector from ' + downloadURL);
592
- }
593
- }, false);
594
- }
595
- })();
596
- }
597
- /**
598
- @public
599
- @class Ember.Debug
600
- */
601
- _emberMetal.default.Debug = {};
602
-
603
- /**
604
- Allows for runtime registration of handler functions that override the default deprecation behavior.
605
- Deprecations are invoked by calls to [Ember.deprecate](http://emberjs.com/api/classes/Ember.html#method_deprecate).
606
- The following example demonstrates its usage by registering a handler that throws an error if the
607
- message contains the word "should", otherwise defers to the default handler.
608
-
609
- ```javascript
610
- Ember.Debug.registerDeprecationHandler((message, options, next) => {
611
- if (message.indexOf('should') !== -1) {
612
- throw new Error(`Deprecation message with should: ${message}`);
613
- } else {
614
- // defer to whatever handler was registered before this one
615
- next(message, options);
616
- }
617
- });
618
- ```
619
-
620
- The handler function takes the following arguments:
621
-
622
- <ul>
623
- <li> <code>message</code> - The message received from the deprecation call.</li>
624
- <li> <code>options</code> - An object passed in with the deprecation call containing additional information including:</li>
625
- <ul>
626
- <li> <code>id</code> - An id of the deprecation in the form of <code>package-name.specific-deprecation</code>.</li>
627
- <li> <code>until</code> - The Ember version number the feature and deprecation will be removed in.</li>
628
- </ul>
629
- <li> <code>next</code> - A function that calls into the previously registered handler.</li>
630
- </ul>
631
-
632
- @public
633
- @static
634
- @method registerDeprecationHandler
635
- @param handler {Function} A function to handle deprecation calls.
636
- @since 2.1.0
637
- */
638
- _emberMetal.default.Debug.registerDeprecationHandler = _emberDebugDeprecate.registerHandler;
639
- /**
640
- Allows for runtime registration of handler functions that override the default warning behavior.
641
- Warnings are invoked by calls made to [Ember.warn](http://emberjs.com/api/classes/Ember.html#method_warn).
642
- The following example demonstrates its usage by registering a handler that does nothing overriding Ember's
643
- default warning behavior.
644
-
645
- ```javascript
646
- // next is not called, so no warnings get the default behavior
647
- Ember.Debug.registerWarnHandler(() => {});
648
- ```
649
-
650
- The handler function takes the following arguments:
651
-
652
- <ul>
653
- <li> <code>message</code> - The message received from the warn call. </li>
654
- <li> <code>options</code> - An object passed in with the warn call containing additional information including:</li>
655
- <ul>
656
- <li> <code>id</code> - An id of the warning in the form of <code>package-name.specific-warning</code>.</li>
657
- </ul>
658
- <li> <code>next</code> - A function that calls into the previously registered handler.</li>
659
- </ul>
660
-
661
- @public
662
- @static
663
- @method registerWarnHandler
664
- @param handler {Function} A function to handle warnings.
665
- @since 2.1.0
666
- */
667
- _emberMetal.default.Debug.registerWarnHandler = _emberDebugWarn.registerHandler;
668
-
669
- /*
670
- We are transitioning away from `ember.js` to `ember.debug.js` to make
671
- it much clearer that it is only for local development purposes.
672
-
673
- This flag value is changed by the tooling (by a simple string replacement)
674
- so that if `ember.js` (which must be output for backwards compat reasons) is
675
- used a nice helpful warning message will be printed out.
676
- */
677
- var runningNonEmberDebugJS = false;
678
- exports.runningNonEmberDebugJS = runningNonEmberDebugJS;
679
- if (runningNonEmberDebugJS) {
680
- _emberMetal.warn('Please use `ember.debug.js` instead of `ember.js` for development and debugging.');
681
- }
682
- });
683
- // reexports
684
- enifed('ember-debug/warn', ['exports', 'ember-console', 'ember-metal', 'ember-debug/handlers'], function (exports, _emberConsole, _emberMetal, _emberDebugHandlers) {
685
- 'use strict';
686
-
687
- exports.registerHandler = registerHandler;
688
- exports.default = warn;
689
-
690
- function registerHandler(handler) {
691
- _emberDebugHandlers.registerHandler('warn', handler);
692
- }
693
-
694
- registerHandler(function logWarning(message, options) {
695
- _emberConsole.default.warn('WARNING: ' + message);
696
- if ('trace' in _emberConsole.default) {
697
- _emberConsole.default.trace();
698
- }
699
- });
700
-
701
- var missingOptionsDeprecation = 'When calling `Ember.warn` you ' + 'must provide an `options` hash as the third parameter. ' + '`options` should include an `id` property.';
702
- exports.missingOptionsDeprecation = missingOptionsDeprecation;
703
- var missingOptionsIdDeprecation = 'When calling `Ember.warn` you must provide `id` in options.';
704
-
705
- exports.missingOptionsIdDeprecation = missingOptionsIdDeprecation;
706
- /**
707
- @module ember
708
- @submodule ember-debug
709
- */
710
-
711
- /**
712
- Display a warning with the provided message.
713
-
714
- * In a production build, this method is defined as an empty function (NOP).
715
- Uses of this method in Ember itself are stripped from the ember.prod.js build.
716
-
717
- @method warn
718
- @param {String} message A warning to display.
719
- @param {Boolean} test An optional boolean. If falsy, the warning
720
- will be displayed.
721
- @param {Object} options An object that can be used to pass a unique
722
- `id` for this warning. The `id` can be used by Ember debugging tools
723
- to change the behavior (raise, log, or silence) for that specific warning.
724
- The `id` should be namespaced by dots, e.g. "ember-debug.feature-flag-with-features-stripped"
725
- @for Ember
726
- @public
727
- @since 1.0.0
728
- */
729
-
730
- function warn(message, test, options) {
731
- if (!options) {
732
- _emberMetal.deprecate(missingOptionsDeprecation, false, {
733
- id: 'ember-debug.warn-options-missing',
734
- until: '3.0.0',
735
- url: 'http://emberjs.com/deprecations/v2.x/#toc_ember-debug-function-options'
736
- });
737
- }
738
-
739
- if (options && !options.id) {
740
- _emberMetal.deprecate(missingOptionsIdDeprecation, false, {
741
- id: 'ember-debug.warn-id-missing',
742
- until: '3.0.0',
743
- url: 'http://emberjs.com/deprecations/v2.x/#toc_ember-debug-function-options'
744
- });
745
- }
746
-
747
- _emberDebugHandlers.invoke.apply(undefined, ['warn'].concat(babelHelpers.slice.call(arguments)));
748
- }
749
- });
750
187
  enifed('ember-testing/adapters/adapter', ['exports', 'ember-runtime'], function (exports, _emberRuntime) {
751
188
  'use strict';
752
189
 
@@ -1113,12 +550,12 @@ enifed('ember-testing/ext/application', ['exports', 'ember-application', 'ember-
1113
550
  };
1114
551
  }
1115
552
  });
1116
- enifed('ember-testing/ext/rsvp', ['exports', 'ember-runtime', 'ember-metal', 'ember-testing/test/adapter'], function (exports, _emberRuntime, _emberMetal, _emberTestingTestAdapter) {
553
+ enifed('ember-testing/ext/rsvp', ['exports', 'ember-runtime', 'ember-metal', 'ember-debug', 'ember-testing/test/adapter'], function (exports, _emberRuntime, _emberMetal, _emberDebug, _emberTestingTestAdapter) {
1117
554
  'use strict';
1118
555
 
1119
556
  _emberRuntime.RSVP.configure('async', function (callback, promise) {
1120
557
  // if schedule will cause autorun, we need to inform adapter
1121
- if (_emberMetal.isTesting() && !_emberMetal.run.backburner.currentInstance) {
558
+ if (_emberDebug.isTesting() && !_emberMetal.run.backburner.currentInstance) {
1122
559
  _emberTestingTestAdapter.asyncStart();
1123
560
  _emberMetal.run.backburner.schedule('actions', function () {
1124
561
  _emberTestingTestAdapter.asyncEnd();
@@ -1133,7 +570,7 @@ enifed('ember-testing/ext/rsvp', ['exports', 'ember-runtime', 'ember-metal', 'em
1133
570
 
1134
571
  exports.default = _emberRuntime.RSVP;
1135
572
  });
1136
- enifed('ember-testing/helpers', ['exports', 'ember-metal', 'ember-testing/test/helpers', 'ember-testing/helpers/and_then', 'ember-testing/helpers/click', 'ember-testing/helpers/current_path', 'ember-testing/helpers/current_route_name', 'ember-testing/helpers/current_url', 'ember-testing/helpers/fill_in', 'ember-testing/helpers/find', 'ember-testing/helpers/find_with_assert', 'ember-testing/helpers/key_event', 'ember-testing/helpers/pause_test', 'ember-testing/helpers/trigger_event', 'ember-testing/helpers/visit', 'ember-testing/helpers/wait'], function (exports, _emberMetal, _emberTestingTestHelpers, _emberTestingHelpersAnd_then, _emberTestingHelpersClick, _emberTestingHelpersCurrent_path, _emberTestingHelpersCurrent_route_name, _emberTestingHelpersCurrent_url, _emberTestingHelpersFill_in, _emberTestingHelpersFind, _emberTestingHelpersFind_with_assert, _emberTestingHelpersKey_event, _emberTestingHelpersPause_test, _emberTestingHelpersTrigger_event, _emberTestingHelpersVisit, _emberTestingHelpersWait) {
573
+ enifed('ember-testing/helpers', ['exports', 'ember-debug', 'ember-testing/test/helpers', 'ember-testing/helpers/and_then', 'ember-testing/helpers/click', 'ember-testing/helpers/current_path', 'ember-testing/helpers/current_route_name', 'ember-testing/helpers/current_url', 'ember-testing/helpers/fill_in', 'ember-testing/helpers/find', 'ember-testing/helpers/find_with_assert', 'ember-testing/helpers/key_event', 'ember-testing/helpers/pause_test', 'ember-testing/helpers/trigger_event', 'ember-testing/helpers/visit', 'ember-testing/helpers/wait'], function (exports, _emberDebug, _emberTestingTestHelpers, _emberTestingHelpersAnd_then, _emberTestingHelpersClick, _emberTestingHelpersCurrent_path, _emberTestingHelpersCurrent_route_name, _emberTestingHelpersCurrent_url, _emberTestingHelpersFill_in, _emberTestingHelpersFind, _emberTestingHelpersFind_with_assert, _emberTestingHelpersKey_event, _emberTestingHelpersPause_test, _emberTestingHelpersTrigger_event, _emberTestingHelpersVisit, _emberTestingHelpersWait) {
1137
574
  'use strict';
1138
575
 
1139
576
  _emberTestingTestHelpers.registerAsyncHelper('visit', _emberTestingHelpersVisit.default);
@@ -1151,7 +588,7 @@ enifed('ember-testing/helpers', ['exports', 'ember-metal', 'ember-testing/test/h
1151
588
  _emberTestingTestHelpers.registerHelper('currentPath', _emberTestingHelpersCurrent_path.default);
1152
589
  _emberTestingTestHelpers.registerHelper('currentURL', _emberTestingHelpersCurrent_url.default);
1153
590
 
1154
- if (false) {
591
+ if (true) {
1155
592
  _emberTestingTestHelpers.registerHelper('resumeTest', _emberTestingHelpersPause_test.resumeTest);
1156
593
  }
1157
594
  });
@@ -1475,7 +912,7 @@ enifed('ember-testing/helpers/key_event', ['exports'], function (exports) {
1475
912
  return app.testHelpers.triggerEvent(selector, context, type, { keyCode: keyCode, which: keyCode });
1476
913
  }
1477
914
  });
1478
- enifed('ember-testing/helpers/pause_test', ['exports', 'ember-runtime', 'ember-console', 'ember-metal'], function (exports, _emberRuntime, _emberConsole, _emberMetal) {
915
+ enifed('ember-testing/helpers/pause_test', ['exports', 'ember-runtime', 'ember-console', 'ember-debug'], function (exports, _emberRuntime, _emberConsole, _emberDebug) {
1479
916
  /**
1480
917
  @module ember
1481
918
  @submodule ember-testing
@@ -1496,7 +933,7 @@ enifed('ember-testing/helpers/pause_test', ['exports', 'ember-runtime', 'ember-c
1496
933
  */
1497
934
 
1498
935
  function resumeTest() {
1499
- _emberMetal.assert('Testing has not been paused. There is nothing to resume.', resume);
936
+ _emberDebug.assert('Testing has not been paused. There is nothing to resume.', resume);
1500
937
  resume();
1501
938
  resume = undefined;
1502
939
  }
@@ -1518,12 +955,12 @@ enifed('ember-testing/helpers/pause_test', ['exports', 'ember-runtime', 'ember-c
1518
955
  */
1519
956
 
1520
957
  function pauseTest() {
1521
- if (false) {
958
+ if (true) {
1522
959
  _emberConsole.default.info('Testing paused. Use `resumeTest()` to continue.');
1523
960
  }
1524
961
 
1525
962
  return new _emberRuntime.RSVP.Promise(function (resolve) {
1526
- if (false) {
963
+ if (true) {
1527
964
  resume = resolve;
1528
965
  }
1529
966
  }, 'TestAdapter paused promise');
@@ -1695,7 +1132,7 @@ enifed('ember-testing/helpers/wait', ['exports', 'ember-testing/test/waiters', '
1695
1132
  // Every 10ms, poll for the async thing to have finished
1696
1133
  var watcher = setInterval(function () {
1697
1134
  // 1. If the router is loading, keep polling
1698
- var routerIsLoading = router.router && !!router.router.activeTransition;
1135
+ var routerIsLoading = router._routerMicrolib && !!router._routerMicrolib.activeTransition;
1699
1136
  if (routerIsLoading) {
1700
1137
  return;
1701
1138
  }
@@ -1759,7 +1196,7 @@ enifed('ember-testing/initializers', ['exports', 'ember-runtime'], function (exp
1759
1196
  }
1760
1197
  });
1761
1198
  });
1762
- enifed('ember-testing/setup_for_testing', ['exports', 'ember-metal', 'ember-views', 'ember-testing/test/adapter', 'ember-testing/test/pending_requests', 'ember-testing/adapters/adapter', 'ember-testing/adapters/qunit'], function (exports, _emberMetal, _emberViews, _emberTestingTestAdapter, _emberTestingTestPending_requests, _emberTestingAdaptersAdapter, _emberTestingAdaptersQunit) {
1199
+ enifed('ember-testing/setup_for_testing', ['exports', 'ember-debug', 'ember-views', 'ember-testing/test/adapter', 'ember-testing/test/pending_requests', 'ember-testing/adapters/adapter', 'ember-testing/adapters/qunit'], function (exports, _emberDebug, _emberViews, _emberTestingTestAdapter, _emberTestingTestPending_requests, _emberTestingAdaptersAdapter, _emberTestingAdaptersQunit) {
1763
1200
  /* global self */
1764
1201
 
1765
1202
  'use strict';
@@ -1780,7 +1217,7 @@ enifed('ember-testing/setup_for_testing', ['exports', 'ember-metal', 'ember-view
1780
1217
  */
1781
1218
 
1782
1219
  function setupForTesting() {
1783
- _emberMetal.setTesting(true);
1220
+ _emberDebug.setTesting(true);
1784
1221
 
1785
1222
  var adapter = _emberTestingTestAdapter.getAdapter();
1786
1223
  // if adapter is not manually set default to QUnit
@@ -1797,7 +1234,7 @@ enifed('ember-testing/setup_for_testing', ['exports', 'ember-metal', 'ember-view
1797
1234
  _emberViews.jQuery(document).on('ajaxComplete', _emberTestingTestPending_requests.decrementPendingRequests);
1798
1235
  }
1799
1236
  });
1800
- enifed('ember-testing/support', ['exports', 'ember-metal', 'ember-views', 'ember-environment'], function (exports, _emberMetal, _emberViews, _emberEnvironment) {
1237
+ enifed('ember-testing/support', ['exports', 'ember-debug', 'ember-views', 'ember-environment'], function (exports, _emberDebug, _emberViews, _emberEnvironment) {
1801
1238
  'use strict';
1802
1239
 
1803
1240
  /**
@@ -1845,7 +1282,7 @@ enifed('ember-testing/support', ['exports', 'ember-metal', 'ember-views', 'ember
1845
1282
 
1846
1283
  // Try again to verify that the patch took effect or blow up.
1847
1284
  testCheckboxClick(function () {
1848
- _emberMetal.warn('clicked checkboxes should be checked! the jQuery patch didn\'t work', this.checked, { id: 'ember-testing.test-checkbox-click' });
1285
+ _emberDebug.warn('clicked checkboxes should be checked! the jQuery patch didn\'t work', this.checked, { id: 'ember-testing.test-checkbox-click' });
1849
1286
  });
1850
1287
  });
1851
1288
  }
@@ -2268,7 +1705,7 @@ enifed('ember-testing/test/run', ['exports', 'ember-metal'], function (exports,
2268
1705
  }
2269
1706
  }
2270
1707
  });
2271
- enifed('ember-testing/test/waiters', ['exports', 'ember-metal'], function (exports, _emberMetal) {
1708
+ enifed('ember-testing/test/waiters', ['exports', 'ember-debug'], function (exports, _emberDebug) {
2272
1709
  'use strict';
2273
1710
 
2274
1711
  exports.registerWaiter = registerWaiter;
@@ -2389,7 +1826,7 @@ enifed('ember-testing/test/waiters', ['exports', 'ember-metal'], function (expor
2389
1826
  }
2390
1827
 
2391
1828
  function generateDeprecatedWaitersArray() {
2392
- _emberMetal.deprecate('Usage of `Ember.Test.waiters` is deprecated. Please refactor to `Ember.Test.checkWaiters`.', false, { until: '2.8.0', id: 'ember-testing.test-waiters' });
1829
+ _emberDebug.deprecate('Usage of `Ember.Test.waiters` is deprecated. Please refactor to `Ember.Test.checkWaiters`.', false, { until: '2.8.0', id: 'ember-testing.test-waiters' });
2393
1830
 
2394
1831
  var array = new Array(callbacks.length);
2395
1832
  for (var i = 0; i < callbacks.length; i++) {
@@ -2402,9 +1839,6 @@ enifed('ember-testing/test/waiters', ['exports', 'ember-metal'], function (expor
2402
1839
  return array;
2403
1840
  }
2404
1841
  });
2405
- var testing = requireModule('ember-testing');
2406
- Ember.Test = testing.Test;
2407
- Ember.Test.Adapter = testing.Adapter;
2408
- Ember.Test.QUnitAdapter = testing.QUnitAdapter;
2409
- Ember.setupForTesting = testing.setupForTesting;
1842
+ requireModule("ember-testing");
1843
+
2410
1844
  }());