ng-zorro-antd
Version:
An enterprise-class UI components based on Ant Design and Angular
38 lines (36 loc) • 6.02 kB
JavaScript
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@angular/core/testing"),require("@angular/platform-browser/animations")):"function"==typeof define&&define.amd?define("ng-zorro-antd/core/testing",["exports","@angular/core","@angular/common","@angular/core/testing","@angular/platform-browser/animations"],t):t(((e=e||self)["ng-zorro-antd"]=e["ng-zorro-antd"]||{},e["ng-zorro-antd"].core=e["ng-zorro-antd"].core||{},e["ng-zorro-antd"].core.testing={}),e.ng.core,e.ng.common,e.ng.core.testing,e.ng.platformBrowser.animations)}(this,(function(e,t,n,r,o){"use strict";
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function u(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)u.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return u}function a(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(u(arguments[t]));return e}
/**
* @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
*/
function c(e,t,n,r){void 0===t&&(t=0),void 0===n&&(n=0),void 0===r&&(r=0);var o=document.createEvent("MouseEvent");return o.initMouseEvent(e,!0,!1,window,0,t,n,t,n,!1,!1,!1,!1,r,null),Object.defineProperty(o,"buttons",{get:function(){return 1}}),o}function f(e,t,n){void 0===t&&(t=0),void 0===n&&(n=0);var r=new UIEvent(e,{detail:0,view:window}),o={pageX:t,pageY:n,clientX:t,clientY:n};return Object.defineProperties(r,{touches:{value:[o]},targetTouches:{value:[o]},changedTouches:{value:[o]}}),r}function d(e,t,n,r,o,i,u){var a=document.createEvent("KeyboardEvent"),c=a.preventDefault;return a.initKeyEvent?a.initKeyEvent(e,!0,!0,window,0,0,0,0,0,t):a.initKeyboardEvent(e,!0,!0,window,0,r,0,"",!1),Object.defineProperties(a,{keyCode:{get:function(){return t}},key:{get:function(){return r}},target:{get:function(){return n}},ctrlKey:{get:function(){return o}},metaKey:{get:function(){return i}},shiftKey:{get:function(){return u}}}),a.preventDefault=function(){return Object.defineProperty(a,"defaultPrevented",{get:function(){return!0},configurable:!0}),c.apply(this,arguments)},a}function p(e,t,n){void 0===t&&(t=!0),void 0===n&&(n=!0);var r=document.createEvent("Event");return r.initEvent(e,t,n),r}function s(e,t){return e.dispatchEvent(t),t}function l(e,t,n){return s(e,p(t,n))}var v=function(){function e(){}return e.prototype.getViewportRect=function(){return{left:0,top:0,width:1014,height:686,bottom:686,right:1014}},e.prototype.getViewportSize=function(){return{width:1014,height:686}},e.prototype.getViewportScrollPosition=function(){return{top:0,left:0}},e}(),g=function(e){function n(){var n=e.call(this,{enableLongStackTrace:!1})||this;return n.onStable=new t.EventEmitter(!1),n}return function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(n,e),n.prototype.run=function(e){return e()},n.prototype.runOutsideAngular=function(e){return e()},n.prototype.simulateZoneExit=function(){this.onStable.emit(null)},n.decorators=[{type:t.Injectable}],n.ctorParameters=function(){return[]},n}(t.NgZone);e.FakeViewportRuler=v,e.MockNgZone=g,e.createFakeEvent=p,e.createKeyboardEvent=d,e.createMouseEvent=c,e.createTouchEvent=f,e.dispatchEvent=s,e.dispatchFakeEvent=l,e.dispatchKeyboardEvent=function(e,t,n,r){return s(e,d(t,n,r))},e.dispatchMouseEvent=function(e,t,n,r,o){return void 0===n&&(n=0),void 0===r&&(r=0),void 0===o&&(o=c(t,n,r)),s(e,o)},e.dispatchTouchEvent=function(e,t,n,r){return void 0===n&&(n=0),void 0===r&&(r=0),s(e,f(t,n,r))},e.typeInElement=function(e,t){t.focus(),t.value=e,l(t,"input")}
/**
* @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
*/,e.wrappedErrorMessage=function(e){var t=e.message.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");return new RegExp(t)}
/**
* @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
*/,e.ɵcreateComponentBed=function(e,i){void 0===i&&(i={providers:[],declarations:[],imports:[]});var u=i.imports,c=i.declarations,f=i.providers,d={imports:a([o.NoopAnimationsModule,n.CommonModule],u||[]),declarations:a([e],c||[]),schemas:[t.NO_ERRORS_SCHEMA],providers:f||[]},p=r.TestBed.configureTestingModule(d),s=r.TestBed.createComponent(e);return s.detectChanges(),{bed:p,fixture:s,nativeElement:s.nativeElement,debugElement:s.debugElement,component:s.componentInstance}},Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=ng-zorro-antd-core-testing.umd.min.js.map