/** * @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 */ /** Gets whether the code is currently running in a test environment. */ export function _isTestEnvironment() { // We can't use `declare const` because it causes conflicts inside Google with the real typings // for these symbols and we can't read them off the global object, because they don't appear to // be attached there for some runners like Jest. // (see: https://github.com/angular/components/issues/23365#issuecomment-938146643) return ( // @ts-ignore (typeof __karma__ !== 'undefined' && !!__karma__) || // @ts-ignore (typeof jasmine !== 'undefined' && !!jasmine) || // @ts-ignore (typeof jest !== 'undefined' && !!jest) || // @ts-ignore (typeof Mocha !== 'undefined' && !!Mocha)); } //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC1lbnZpcm9ubWVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9jZGsvcGxhdGZvcm0vZmVhdHVyZXMvdGVzdC1lbnZpcm9ubWVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7O0dBTUc7QUFFSCx3RUFBd0U7QUFDeEUsTUFBTSxVQUFVLGtCQUFrQjtJQUNoQywrRkFBK0Y7SUFDL0YsK0ZBQStGO0lBQy9GLGdEQUFnRDtJQUNoRCxtRkFBbUY7SUFDbkYsT0FBTztJQUNMLGFBQWE7SUFDYixDQUFDLE9BQU8sU0FBUyxLQUFLLFdBQVcsSUFBSSxDQUFDLENBQUMsU0FBUyxDQUFDO1FBQ2pELGFBQWE7UUFDYixDQUFDLE9BQU8sT0FBTyxLQUFLLFdBQVcsSUFBSSxDQUFDLENBQUMsT0FBTyxDQUFDO1FBQzdDLGFBQWE7UUFDYixDQUFDLE9BQU8sSUFBSSxLQUFLLFdBQVcsSUFBSSxDQUFDLENBQUMsSUFBSSxDQUFDO1FBQ3ZDLGFBQWE7UUFDYixDQUFDLE9BQU8sS0FBSyxLQUFLLFdBQVcs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