mirror of https://github.com/ghostfolio/ghostfolio
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
7 lines
2.3 KiB
7 lines
2.3 KiB
'use strict';
|
|
/**
|
|
* @license Angular
|
|
* (c) 2010-2025 Google LLC. https://angular.dev/
|
|
* License: MIT
|
|
*/
|
|
function S(Z){Z.__load_patch("mocha",(t,o)=>{let i=t.Mocha;if(typeof i=="undefined")return;if(typeof o=="undefined")throw new Error("Missing Zone.js");let h=o.ProxyZoneSpec,_=o.SyncTestZoneSpec;if(!h)throw new Error("Missing ProxyZoneSpec");if(i.__zone_patch__)throw new Error('"Mocha" has already been patched with "Zone".');i.__zone_patch__=!0;let y=o.current,k=y.fork(new _("Mocha.describe")),f=null,m=y.fork(new h),s={after:t.after,afterEach:t.afterEach,before:t.before,beforeEach:t.beforeEach,describe:t.describe,it:t.it};function a(e,u,c){for(let n=0;n<e.length;n++){let r=e[n];typeof r=="function"&&(e[n]=r.length===0?u(r):c(r),e[n].toString=function(){return r.toString()})}return e}function d(e){return a(e,function(c){return function(){return k.run(c,this,arguments)}})}function p(e){return a(e,function(n){return function(){return f.run(n,this)}},function(n){return function(r){return f.run(n,this,[r])}})}function T(e){return a(e,function(n){return function(){return m.run(n,this)}},function(n){return function(r){return m.run(n,this,[r])}})}t.describe=t.suite=function(){return s.describe.apply(this,d(arguments))},t.xdescribe=t.suite.skip=t.describe.skip=function(){return s.describe.skip.apply(this,d(arguments))},t.describe.only=t.suite.only=function(){return s.describe.only.apply(this,d(arguments))},t.it=t.specify=t.test=function(){return s.it.apply(this,p(arguments))},t.xit=t.xspecify=t.it.skip=function(){return s.it.skip.apply(this,p(arguments))},t.it.only=t.test.only=function(){return s.it.only.apply(this,p(arguments))},t.after=t.suiteTeardown=function(){return s.after.apply(this,T(arguments))},t.afterEach=t.teardown=function(){return s.afterEach.apply(this,p(arguments))},t.before=t.suiteSetup=function(){return s.before.apply(this,T(arguments))},t.beforeEach=t.setup=function(){return s.beforeEach.apply(this,p(arguments))},((e,u)=>{i.Runner.prototype.runTest=function(c){o.current.scheduleMicroTask("mocha.forceTask",()=>{e.call(this,c)})},i.Runner.prototype.run=function(c){return this.on("test",n=>{f=y.fork(new h)}),this.on("fail",(n,r)=>{let w=f&&f.get("ProxyZoneSpec");if(w&&r)try{r.message+=w.getAndClearPendingTasksInfo()}catch(E){}}),u.call(this,c)}})(i.Runner.prototype.runTest,i.Runner.prototype.run)})}S(Zone);
|
|
|