blob: 98fc38e1e1d2584b34acf46a2bc170ab5926c3d8 [file] [log] [blame]
"use strict";
/**
* @license Angular v12.0.0-next.0
* (c) 2010-2020 Google LLC. https://angular.io/
* License: MIT
*/!function(n){"function"==typeof define&&define.amd?define(n):n()}((function(){
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
Zone.__load_patch("mocha",(function(n,t){var e=n.Mocha;if(void 0!==e){if(void 0===t)throw new Error("Missing Zone.js");var r=t.ProxyZoneSpec,i=t.SyncTestZoneSpec;if(!r)throw new Error("Missing ProxyZoneSpec");if(e.__zone_patch__)throw new Error('"Mocha" has already been patched with "Zone".');e.__zone_patch__=!0;var o,u,c=t.current,f=c.fork(new i("Mocha.describe")),s=null,a=c.fork(new r),h={after:e.after,afterEach:e.afterEach,before:e.before,beforeEach:e.beforeEach,describe:e.describe,it:e.it};n.describe=n.suite=e.describe=function(){return h.describe.apply(this,y(arguments))},n.xdescribe=n.suite.skip=e.describe.skip=function(){return h.describe.skip.apply(this,y(arguments))},n.describe.only=n.suite.only=e.describe.only=function(){return h.describe.only.apply(this,y(arguments))},n.it=n.specify=n.test=e.it=function(){return h.it.apply(this,l(arguments))},n.xit=n.xspecify=e.it.skip=function(){return h.it.skip.apply(this,l(arguments))},n.it.only=n.test.only=e.it.only=function(){return h.it.only.apply(this,l(arguments))},n.after=n.suiteTeardown=e.after=function(){return h.after.apply(this,d(arguments))},n.afterEach=n.teardown=e.afterEach=function(){return h.afterEach.apply(this,l(arguments))},n.before=n.suiteSetup=e.before=function(){return h.before.apply(this,d(arguments))},n.beforeEach=n.setup=e.beforeEach=function(){return h.beforeEach.apply(this,l(arguments))},o=e.Runner.prototype.runTest,u=e.Runner.prototype.run,e.Runner.prototype.runTest=function(n){var e=this;t.current.scheduleMicroTask("mocha.forceTask",(function(){o.call(e,n)}))},e.Runner.prototype.run=function(n){return this.on("test",(function(n){s=c.fork(new r)})),this.on("fail",(function(n,t){var e=s&&s.get("ProxyZoneSpec");if(e&&t)try{t.message+=e.getAndClearPendingTasksInfo()}catch(n){}})),u.call(this,n)}}function p(n,t,e){for(var r=function(r){var i=n[r];"function"==typeof i&&(n[r]=0===i.length?t(i):e(i),n[r].toString=function(){return i.toString()})},i=0;i<n.length;i++)r(i);return n}function y(n){return p(n,(function(n){return function(){return f.run(n,this,arguments)}}))}function l(n){return p(n,(function(n){return function(){return s.run(n,this)}}),(function(n){return function(t){return s.run(n,this,[t])}}))}function d(n){return p(n,(function(n){return function(){return a.run(n,this)}}),(function(n){return function(t){return a.run(n,this,[t])}}))}}))}));