source: trip-planner-front/node_modules/zone.js/fesm2015/mocha-patch.min.js@ b738035

Last change on this file since b738035 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 2.6 KB
RevLine 
[6a3a178]1"use strict";
2/**
3 * @license Angular v12.0.0-next.0
4 * (c) 2010-2020 Google LLC. https://angular.io/
5 * License: MIT
6 */
7/**
8 * @license
9 * Copyright Google LLC All Rights Reserved.
10 *
11 * Use of this source code is governed by an MIT-style license that can be
12 * found in the LICENSE file at https://angular.io/license
13 */Zone.__load_patch("mocha",(t,e)=>{const n=t.Mocha;if(void 0===n)return;if(void 0===e)throw new Error("Missing Zone.js");const r=e.ProxyZoneSpec,i=e.SyncTestZoneSpec;if(!r)throw new Error("Missing ProxyZoneSpec");if(n.__zone_patch__)throw new Error('"Mocha" has already been patched with "Zone".');n.__zone_patch__=!0;const o=e.current,c=o.fork(new i("Mocha.describe"));let u=null;const s=o.fork(new r),f={after:n.after,afterEach:n.afterEach,before:n.before,beforeEach:n.beforeEach,describe:n.describe,it:n.it};function a(t,e,n){for(let r=0;r<t.length;r++){let i=t[r];"function"==typeof i&&(t[r]=0===i.length?e(i):n(i),t[r].toString=function(){return i.toString()})}return t}function h(t){return a(t,(function(t){return function(){return c.run(t,this,arguments)}}))}function p(t){return a(t,(function(t){return function(){return u.run(t,this)}}),(function(t){return function(e){return u.run(t,this,[e])}}))}function l(t){return a(t,(function(t){return function(){return s.run(t,this)}}),(function(t){return function(e){return s.run(t,this,[e])}}))}var y,b;t.describe=t.suite=n.describe=function(){return f.describe.apply(this,h(arguments))},t.xdescribe=t.suite.skip=n.describe.skip=function(){return f.describe.skip.apply(this,h(arguments))},t.describe.only=t.suite.only=n.describe.only=function(){return f.describe.only.apply(this,h(arguments))},t.it=t.specify=t.test=n.it=function(){return f.it.apply(this,p(arguments))},t.xit=t.xspecify=n.it.skip=function(){return f.it.skip.apply(this,p(arguments))},t.it.only=t.test.only=n.it.only=function(){return f.it.only.apply(this,p(arguments))},t.after=t.suiteTeardown=n.after=function(){return f.after.apply(this,l(arguments))},t.afterEach=t.teardown=n.afterEach=function(){return f.afterEach.apply(this,p(arguments))},t.before=t.suiteSetup=n.before=function(){return f.before.apply(this,l(arguments))},t.beforeEach=t.setup=n.beforeEach=function(){return f.beforeEach.apply(this,p(arguments))},y=n.Runner.prototype.runTest,b=n.Runner.prototype.run,n.Runner.prototype.runTest=function(t){e.current.scheduleMicroTask("mocha.forceTask",()=>{y.call(this,t)})},n.Runner.prototype.run=function(t){return this.on("test",t=>{u=o.fork(new r)}),this.on("fail",(t,e)=>{const n=u&&u.get("ProxyZoneSpec");if(n&&e)try{e.message+=n.getAndClearPendingTasksInfo()}catch(t){}}),b.call(this,t)}});
Note: See TracBrowser for help on using the repository browser.