ng-bullet
Version:
Angular library which drastically improves execution time of your component's unit tests
2 lines • 3.1 kB
JavaScript
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core/testing")):"function"==typeof define&&define.amd?define("ng-bullet",["exports","@angular/core/testing"],t):t(e["ng-bullet"]={},e.ng.core.testing)}(this,function(e,r){"use strict";function o(t,u,c,s){return new(c||(c=Promise))(function(e,n){function r(e){try{i(s.next(e))}catch(t){n(t)}}function o(e){try{i(s["throw"](e))}catch(t){n(t)}}function i(t){t.done?e(t.value):new c(function(e){e(t.value)}).then(r,o)}i((s=s.apply(t,u||[])).next())})}function i(r,o){var i,u,c,e,s={label:0,sent:function(){if(1&c[0])throw c[1];return c[1]},trys:[],ops:[]};return e={next:t(0),"throw":t(1),"return":t(2)},"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(n){return function(e){return function t(e){if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,u&&(c=u[2&e[0]?"return":e[0]?"throw":"next"])&&!(c=c.call(u,e[1])).done)return c;switch(u=0,c&&(e=[0,c.value]),e[0]){case 0:case 1:c=e;break;case 4:return s.label++,{value:e[1],done:!1};case 5:s.label++,u=e[1],e=[0];continue;case 7:e=s.ops.pop(),s.trys.pop();continue;default:if(!(c=0<(c=s.trys).length&&c[c.length-1])&&(6===e[0]||2===e[0])){s=0;continue}if(3===e[0]&&(!c||e[1]>c[0]&&e[1]<c[3])){s.label=e[1];break}if(6===e[0]&&s.label<c[1]){s.label=c[1],c=e;break}if(c&&s.label<c[2]){s.label=c[2],s.ops.push(e);break}c[2]&&s.ops.pop(),s.trys.pop();continue}e=o.call(r,s)}catch(t){e=[6,t],u=0}finally{i=c=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([n,e])}}}var u=this,n=function(){function e(e){this.fixture=e}return Object.defineProperty(e.prototype,"component",{get:function(){return this.fixture.componentInstance},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){return this.fixture.debugElement.nativeElement},enumerable:!0,configurable:!0}),e.prototype.detectChanges=function(){this.fixture.detectChanges()},e.prototype.resolve=function(e){return this.fixture.debugElement.injector.get(e)},e}(),c=function(e){var t=r.TestBed.createComponent(e);return new n(t)};e.configureTestSuite=function(t){var e=r.getTestBed(),n=r.TestBed.resetTestingModule;beforeAll(function(){r.TestBed.resetTestingModule(),r.TestBed.resetTestingModule=function(){return r.TestBed}}),t&&beforeAll(function(e){return o(u,void 0,void 0,function(){return i(this,function(e){switch(e.label){case 0:return t(),[4,r.TestBed.compileComponents()];case 1:return e.sent(),[2]}})}).then(e)["catch"](e.fail)}),afterEach(function(){e._activeFixtures.forEach(function(e){return e.destroy()}),e._instantiated=!1}),afterAll(function(){r.TestBed.resetTestingModule=n,r.TestBed.resetTestingModule()})},e.TestCtx=n,e.createTestContext=c,e.createStableTestContext=function(n){return o(u,void 0,void 0,function(){var t;return i(this,function(e){switch(e.label){case 0:return(t=c(n)).detectChanges(),[4,t.fixture.whenStable()];case 1:return e.sent(),t.detectChanges(),[2,t]}})})},Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=ng-bullet.umd.min.js.map