UNPKG

1.48 kBSource Map (JSON)View Raw
1{"version":3,"file":"async_test_completer.js","sourceRoot":"","sources":["../../../../modules/@angular/core/testing/async_test_completer.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;GAEG;AACH;IAAA;QAAA,iBAYC;QATS,aAAQ,GAAiB,IAAI,OAAO,CAAC,UAAC,GAAG,EAAE,GAAG;YACpD,KAAI,CAAC,QAAQ,GAAG,GAAG,CAAC;YACpB,KAAI,CAAC,OAAO,GAAG,GAAG,CAAC;QACrB,CAAC,CAAC,CAAC;IAML,CAAC;IALC,iCAAI,GAAJ,UAAK,KAAW,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAE3C,iCAAI,GAAJ,UAAK,KAAW,EAAE,UAAmB,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAE/D,sBAAI,uCAAO;aAAX,cAA8B,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;;;OAAA;IACvD,yBAAC;AAAD,CAAC,AAZD,IAYC","sourcesContent":["/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Injectable completer that allows signaling completion of an asynchronous test. Used internally.\n */\nexport class AsyncTestCompleter {\n private _resolve: (result: any) => void;\n private _reject: (err: any) => void;\n private _promise: Promise<any> = new Promise((res, rej) => {\n this._resolve = res;\n this._reject = rej;\n });\n done(value?: any) { this._resolve(value); }\n\n fail(error?: any, stackTrace?: string) { this._reject(error); }\n\n get promise(): Promise<any> { return this._promise; }\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
\No newline at end of file