mirror of
				https://github.com/shivammathur/setup-php.git
				synced 2025-10-31 15:26:23 +07:00 
			
		
		
		
	init
This commit is contained in:
		
							
								
								
									
										9
									
								
								node_modules/jest-jasmine2/build/ExpectationFailed.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								node_modules/jest-jasmine2/build/ExpectationFailed.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,9 @@ | ||||
| /** | ||||
|  * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||||
|  * | ||||
|  * This source code is licensed under the MIT license found in the | ||||
|  * LICENSE file in the root directory of this source tree. | ||||
|  */ | ||||
| export default class ExpectationFailed extends Error { | ||||
| } | ||||
| //# sourceMappingURL=ExpectationFailed.d.ts.map | ||||
							
								
								
									
										1
									
								
								node_modules/jest-jasmine2/build/ExpectationFailed.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/jest-jasmine2/build/ExpectationFailed.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| {"version":3,"file":"ExpectationFailed.d.ts","sourceRoot":"","sources":["../src/ExpectationFailed.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,KAAK;CAAG"} | ||||
							
								
								
									
										16
									
								
								node_modules/jest-jasmine2/build/ExpectationFailed.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								node_modules/jest-jasmine2/build/ExpectationFailed.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,16 @@ | ||||
| 'use strict'; | ||||
|  | ||||
| Object.defineProperty(exports, '__esModule', { | ||||
|   value: true | ||||
| }); | ||||
| exports.default = void 0; | ||||
|  | ||||
| /** | ||||
|  * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||||
|  * | ||||
|  * This source code is licensed under the MIT license found in the | ||||
|  * LICENSE file in the root directory of this source tree. | ||||
|  */ | ||||
| class ExpectationFailed extends Error {} | ||||
|  | ||||
| exports.default = ExpectationFailed; | ||||
							
								
								
									
										85
									
								
								node_modules/jest-jasmine2/build/PCancelable.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										85
									
								
								node_modules/jest-jasmine2/build/PCancelable.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,85 @@ | ||||
| /** | ||||
|  * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||||
|  * | ||||
|  * This source code is licensed under the MIT license found in the | ||||
|  * LICENSE file in the root directory of this source tree. | ||||
|  */ | ||||
| 'use strict'; | ||||
|  | ||||
| var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; | ||||
| var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; | ||||
| var Promise = global[Symbol.for('jest-native-promise')] || global.Promise; | ||||
|  | ||||
| class CancelError extends Error { | ||||
|   constructor() { | ||||
|     super('Promise was canceled'); | ||||
|     this.name = 'CancelError'; | ||||
|   } | ||||
| } | ||||
|  | ||||
| class PCancelable { | ||||
|   static fn(fn) { | ||||
|     return function() { | ||||
|       const args = [].slice.apply(arguments); | ||||
|       return new PCancelable((onCancel, resolve, reject) => { | ||||
|         args.unshift(onCancel); | ||||
|         fn.apply(null, args).then(resolve, reject); | ||||
|       }); | ||||
|     }; | ||||
|   } | ||||
|  | ||||
|   constructor(executor) { | ||||
|     this._pending = true; | ||||
|     this._canceled = false; | ||||
|     this._promise = new Promise((resolve, reject) => { | ||||
|       this._reject = reject; | ||||
|       return executor( | ||||
|         fn => { | ||||
|           this._cancel = fn; | ||||
|         }, | ||||
|         val => { | ||||
|           this._pending = false; | ||||
|           resolve(val); | ||||
|         }, | ||||
|         err => { | ||||
|           this._pending = false; | ||||
|           reject(err); | ||||
|         } | ||||
|       ); | ||||
|     }); | ||||
|   } | ||||
|  | ||||
|   then() { | ||||
|     return this._promise.then.apply(this._promise, arguments); | ||||
|   } | ||||
|  | ||||
|   catch() { | ||||
|     return this._promise.catch.apply(this._promise, arguments); | ||||
|   } | ||||
|  | ||||
|   cancel() { | ||||
|     if (!this._pending || this._canceled) { | ||||
|       return; | ||||
|     } | ||||
|  | ||||
|     if (typeof this._cancel === 'function') { | ||||
|       try { | ||||
|         this._cancel(); | ||||
|       } catch (err) { | ||||
|         this._reject(err); | ||||
|       } | ||||
|     } | ||||
|  | ||||
|     this._canceled = true; | ||||
|  | ||||
|     this._reject(new CancelError()); | ||||
|   } | ||||
|  | ||||
|   get canceled() { | ||||
|     return this._canceled; | ||||
|   } | ||||
| } | ||||
|  | ||||
| Object.setPrototypeOf(PCancelable.prototype, Promise.prototype); | ||||
| module.exports = PCancelable; | ||||
| module.exports.CancelError = CancelError; | ||||
							
								
								
									
										11
									
								
								node_modules/jest-jasmine2/build/assertionErrorMessage.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								node_modules/jest-jasmine2/build/assertionErrorMessage.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,11 @@ | ||||
| /** | ||||
|  * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||||
|  * | ||||
|  * This source code is licensed under the MIT license found in the | ||||
|  * LICENSE file in the root directory of this source tree. | ||||
|  */ | ||||
| import { DiffOptions } from 'jest-matcher-utils'; | ||||
| import { AssertionErrorWithStack } from './types'; | ||||
| declare function assertionErrorMessage(error: AssertionErrorWithStack, options: DiffOptions): string; | ||||
| export default assertionErrorMessage; | ||||
| //# sourceMappingURL=assertionErrorMessage.d.ts.map | ||||
							
								
								
									
										1
									
								
								node_modules/jest-jasmine2/build/assertionErrorMessage.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/jest-jasmine2/build/assertionErrorMessage.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| {"version":3,"file":"assertionErrorMessage.d.ts","sourceRoot":"","sources":["../src/assertionErrorMessage.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAIL,WAAW,EACZ,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAC,uBAAuB,EAAC,MAAM,SAAS,CAAC;AA4EhD,iBAAS,qBAAqB,CAC5B,KAAK,EAAE,uBAAuB,EAC9B,OAAO,EAAE,WAAW,UAyCrB;AAMD,eAAe,qBAAqB,CAAC"} | ||||
							
								
								
									
										149
									
								
								node_modules/jest-jasmine2/build/assertionErrorMessage.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										149
									
								
								node_modules/jest-jasmine2/build/assertionErrorMessage.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,149 @@ | ||||
| 'use strict'; | ||||
|  | ||||
| Object.defineProperty(exports, '__esModule', { | ||||
|   value: true | ||||
| }); | ||||
| exports.default = void 0; | ||||
|  | ||||
| var _jestMatcherUtils = require('jest-matcher-utils'); | ||||
|  | ||||
| var _chalk = _interopRequireDefault(require('chalk')); | ||||
|  | ||||
| function _interopRequireDefault(obj) { | ||||
|   return obj && obj.__esModule ? obj : {default: obj}; | ||||
| } | ||||
|  | ||||
| /** | ||||
|  * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||||
|  * | ||||
|  * This source code is licensed under the MIT license found in the | ||||
|  * LICENSE file in the root directory of this source tree. | ||||
|  */ | ||||
| const assertOperatorsMap = { | ||||
|   '!=': 'notEqual', | ||||
|   '!==': 'notStrictEqual', | ||||
|   '==': 'equal', | ||||
|   '===': 'strictEqual' | ||||
| }; | ||||
| const humanReadableOperators = { | ||||
|   deepEqual: 'to deeply equal', | ||||
|   deepStrictEqual: 'to deeply and strictly equal', | ||||
|   equal: 'to be equal', | ||||
|   notDeepEqual: 'not to deeply equal', | ||||
|   notDeepStrictEqual: 'not to deeply and strictly equal', | ||||
|   notEqual: 'to not be equal', | ||||
|   notStrictEqual: 'not be strictly equal', | ||||
|   strictEqual: 'to strictly be equal' | ||||
| }; | ||||
|  | ||||
| const getOperatorName = (operator, stack) => { | ||||
|   if (typeof operator === 'string') { | ||||
|     return assertOperatorsMap[operator] || operator; | ||||
|   } | ||||
|  | ||||
|   if (stack.match('.doesNotThrow')) { | ||||
|     return 'doesNotThrow'; | ||||
|   } | ||||
|  | ||||
|   if (stack.match('.throws')) { | ||||
|     return 'throws'; | ||||
|   } | ||||
|  | ||||
|   return ''; | ||||
| }; | ||||
|  | ||||
| const operatorMessage = operator => { | ||||
|   const niceOperatorName = getOperatorName(operator, ''); | ||||
|   const humanReadableOperator = humanReadableOperators[niceOperatorName]; | ||||
|   return typeof operator === 'string' | ||||
|     ? `${humanReadableOperator || niceOperatorName} to:\n` | ||||
|     : ''; | ||||
| }; | ||||
|  | ||||
| const assertThrowingMatcherHint = operatorName => | ||||
|   operatorName | ||||
|     ? _chalk.default.dim('assert') + | ||||
|       _chalk.default.dim('.' + operatorName + '(') + | ||||
|       _chalk.default.red('function') + | ||||
|       _chalk.default.dim(')') | ||||
|     : ''; | ||||
|  | ||||
| const assertMatcherHint = (operator, operatorName, expected) => { | ||||
|   let message = ''; | ||||
|  | ||||
|   if (operator === '==' && expected === true) { | ||||
|     message = | ||||
|       _chalk.default.dim('assert') + | ||||
|       _chalk.default.dim('(') + | ||||
|       _chalk.default.red('received') + | ||||
|       _chalk.default.dim(')'); | ||||
|   } else if (operatorName) { | ||||
|     message = | ||||
|       _chalk.default.dim('assert') + | ||||
|       _chalk.default.dim('.' + operatorName + '(') + | ||||
|       _chalk.default.red('received') + | ||||
|       _chalk.default.dim(', ') + | ||||
|       _chalk.default.green('expected') + | ||||
|       _chalk.default.dim(')'); | ||||
|   } | ||||
|  | ||||
|   return message; | ||||
| }; | ||||
|  | ||||
| function assertionErrorMessage(error, options) { | ||||
|   const expected = error.expected, | ||||
|     actual = error.actual, | ||||
|     generatedMessage = error.generatedMessage, | ||||
|     message = error.message, | ||||
|     operator = error.operator, | ||||
|     stack = error.stack; | ||||
|   const diffString = (0, _jestMatcherUtils.diff)(expected, actual, options); | ||||
|   const hasCustomMessage = !generatedMessage; | ||||
|   const operatorName = getOperatorName(operator, stack); | ||||
|   const trimmedStack = stack | ||||
|     .replace(message, '') | ||||
|     .replace(/AssertionError(.*)/g, ''); | ||||
|  | ||||
|   if (operatorName === 'doesNotThrow') { | ||||
|     return ( | ||||
|       buildHintString(assertThrowingMatcherHint(operatorName)) + | ||||
|       _chalk.default.reset(`Expected the function not to throw an error.\n`) + | ||||
|       _chalk.default.reset(`Instead, it threw:\n`) + | ||||
|       `  ${(0, _jestMatcherUtils.printReceived)(actual)}` + | ||||
|       _chalk.default.reset( | ||||
|         hasCustomMessage ? '\n\nMessage:\n  ' + message : '' | ||||
|       ) + | ||||
|       trimmedStack | ||||
|     ); | ||||
|   } | ||||
|  | ||||
|   if (operatorName === 'throws') { | ||||
|     return ( | ||||
|       buildHintString(assertThrowingMatcherHint(operatorName)) + | ||||
|       _chalk.default.reset(`Expected the function to throw an error.\n`) + | ||||
|       _chalk.default.reset(`But it didn't throw anything.`) + | ||||
|       _chalk.default.reset( | ||||
|         hasCustomMessage ? '\n\nMessage:\n  ' + message : '' | ||||
|       ) + | ||||
|       trimmedStack | ||||
|     ); | ||||
|   } | ||||
|  | ||||
|   return ( | ||||
|     buildHintString(assertMatcherHint(operator, operatorName, expected)) + | ||||
|     _chalk.default.reset(`Expected value ${operatorMessage(operator)}`) + | ||||
|     `  ${(0, _jestMatcherUtils.printExpected)(expected)}\n` + | ||||
|     _chalk.default.reset(`Received:\n`) + | ||||
|     `  ${(0, _jestMatcherUtils.printReceived)(actual)}` + | ||||
|     _chalk.default.reset(hasCustomMessage ? '\n\nMessage:\n  ' + message : '') + | ||||
|     (diffString ? `\n\nDifference:\n\n${diffString}` : '') + | ||||
|     trimmedStack | ||||
|   ); | ||||
| } | ||||
|  | ||||
| function buildHintString(hint) { | ||||
|   return hint ? hint + '\n\n' : ''; | ||||
| } | ||||
|  | ||||
| var _default = assertionErrorMessage; | ||||
| exports.default = _default; | ||||
							
								
								
									
										10
									
								
								node_modules/jest-jasmine2/build/each.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								node_modules/jest-jasmine2/build/each.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,10 @@ | ||||
| /** | ||||
|  * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||||
|  * | ||||
|  * This source code is licensed under the MIT license found in the | ||||
|  * LICENSE file in the root directory of this source tree. | ||||
|  */ | ||||
| import { JestEnvironment } from '@jest/environment'; | ||||
| declare const _default: (environment: JestEnvironment) => void; | ||||
| export default _default; | ||||
| //# sourceMappingURL=each.d.ts.map | ||||
							
								
								
									
										1
									
								
								node_modules/jest-jasmine2/build/each.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/jest-jasmine2/build/each.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| {"version":3,"file":"each.d.ts","sourceRoot":"","sources":["../src/each.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;;AAGlD,wBAgBE"} | ||||
							
								
								
									
										34
									
								
								node_modules/jest-jasmine2/build/each.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								node_modules/jest-jasmine2/build/each.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,34 @@ | ||||
| 'use strict'; | ||||
|  | ||||
| Object.defineProperty(exports, '__esModule', { | ||||
|   value: true | ||||
| }); | ||||
| exports.default = void 0; | ||||
|  | ||||
| var _jestEach = require('jest-each'); | ||||
|  | ||||
| /** | ||||
|  * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||||
|  * | ||||
|  * This source code is licensed under the MIT license found in the | ||||
|  * LICENSE file in the root directory of this source tree. | ||||
|  */ | ||||
| var _default = environment => { | ||||
|   environment.global.it.each = (0, _jestEach.bind)(environment.global.it); | ||||
|   environment.global.fit.each = (0, _jestEach.bind)(environment.global.fit); | ||||
|   environment.global.xit.each = (0, _jestEach.bind)(environment.global.xit); | ||||
|   environment.global.describe.each = (0, _jestEach.bind)( | ||||
|     environment.global.describe, | ||||
|     false | ||||
|   ); | ||||
|   environment.global.xdescribe.each = (0, _jestEach.bind)( | ||||
|     environment.global.xdescribe, | ||||
|     false | ||||
|   ); | ||||
|   environment.global.fdescribe.each = (0, _jestEach.bind)( | ||||
|     environment.global.fdescribe, | ||||
|     false | ||||
|   ); | ||||
| }; | ||||
|  | ||||
| exports.default = _default; | ||||
							
								
								
									
										9
									
								
								node_modules/jest-jasmine2/build/errorOnPrivate.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								node_modules/jest-jasmine2/build/errorOnPrivate.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,9 @@ | ||||
| /** | ||||
|  * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||||
|  * | ||||
|  * This source code is licensed under the MIT license found in the | ||||
|  * LICENSE file in the root directory of this source tree. | ||||
|  */ | ||||
| import { Global } from '@jest/types'; | ||||
| export declare function installErrorOnPrivate(global: Global.Global): void; | ||||
| //# sourceMappingURL=errorOnPrivate.d.ts.map | ||||
							
								
								
									
										1
									
								
								node_modules/jest-jasmine2/build/errorOnPrivate.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/jest-jasmine2/build/errorOnPrivate.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| {"version":3,"file":"errorOnPrivate.d.ts","sourceRoot":"","sources":["../src/errorOnPrivate.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAkCnC,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,GAAG,IAAI,CAmCjE"} | ||||
							
								
								
									
										66
									
								
								node_modules/jest-jasmine2/build/errorOnPrivate.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										66
									
								
								node_modules/jest-jasmine2/build/errorOnPrivate.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,66 @@ | ||||
| 'use strict'; | ||||
|  | ||||
| Object.defineProperty(exports, '__esModule', { | ||||
|   value: true | ||||
| }); | ||||
| exports.installErrorOnPrivate = installErrorOnPrivate; | ||||
|  | ||||
| var _jestUtil = require('jest-util'); | ||||
|  | ||||
| /** | ||||
|  * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||||
|  * | ||||
|  * This source code is licensed under the MIT license found in the | ||||
|  * LICENSE file in the root directory of this source tree. | ||||
|  */ | ||||
| // prettier-ignore | ||||
| const disabledGlobals = { | ||||
|   fail: 'Illegal usage of global `fail`, prefer throwing an error, or the `done.fail` callback.', | ||||
|   pending: 'Illegal usage of global `pending`, prefer explicitly skipping a test using `test.skip`', | ||||
|   spyOn: 'Illegal usage of global `spyOn`, prefer `jest.spyOn`.', | ||||
|   spyOnProperty: 'Illegal usage of global `spyOnProperty`, prefer `jest.spyOn`.' | ||||
| }; | ||||
| // prettier-ignore | ||||
| const disabledJasmineMethods = { | ||||
|   addMatchers: 'Illegal usage of `jasmine.addMatchers`, prefer `expect.extends`.', | ||||
|   any: 'Illegal usage of `jasmine.any`, prefer `expect.any`.', | ||||
|   anything: 'Illegal usage of `jasmine.anything`, prefer `expect.anything`.', | ||||
|   arrayContaining: 'Illegal usage of `jasmine.arrayContaining`, prefer `expect.arrayContaining`.', | ||||
|   createSpy: 'Illegal usage of `jasmine.createSpy`, prefer `jest.fn`.', | ||||
|   objectContaining: 'Illegal usage of `jasmine.objectContaining`, prefer `expect.objectContaining`.', | ||||
|   stringMatching: 'Illegal usage of `jasmine.stringMatching`, prefer `expect.stringMatching`.' | ||||
| }; | ||||
|  | ||||
| function installErrorOnPrivate(global) { | ||||
|   const jasmine = global.jasmine; | ||||
|   Object.keys(disabledGlobals).forEach(functionName => { | ||||
|     global[functionName] = () => { | ||||
|       throwAtFunction(disabledGlobals[functionName], global[functionName]); | ||||
|     }; | ||||
|   }); | ||||
|   Object.keys(disabledJasmineMethods).forEach(methodName => { | ||||
|     // @ts-ignore | ||||
|     jasmine[methodName] = () => { | ||||
|       throwAtFunction(disabledJasmineMethods[methodName], jasmine[methodName]); | ||||
|     }; | ||||
|   }); | ||||
|  | ||||
|   function set() { | ||||
|     throwAtFunction( | ||||
|       'Illegal usage of `jasmine.DEFAULT_TIMEOUT_INTERVAL`, prefer `jest.setTimeout`.', | ||||
|       set | ||||
|     ); | ||||
|   } | ||||
|  | ||||
|   const original = jasmine.DEFAULT_TIMEOUT_INTERVAL; | ||||
|   Object.defineProperty(jasmine, 'DEFAULT_TIMEOUT_INTERVAL', { | ||||
|     configurable: true, | ||||
|     enumerable: true, | ||||
|     get: () => original, | ||||
|     set | ||||
|   }); | ||||
| } | ||||
|  | ||||
| function throwAtFunction(message, fn) { | ||||
|   throw new _jestUtil.ErrorWithStack(message, fn); | ||||
| } | ||||
							
								
								
									
										17
									
								
								node_modules/jest-jasmine2/build/expectationResultFactory.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								node_modules/jest-jasmine2/build/expectationResultFactory.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,17 @@ | ||||
| /** | ||||
|  * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||||
|  * | ||||
|  * This source code is licensed under the MIT license found in the | ||||
|  * LICENSE file in the root directory of this source tree. | ||||
|  */ | ||||
| import { FailedAssertion } from '@jest/test-result'; | ||||
| export declare type Options = { | ||||
|     matcherName: string; | ||||
|     passed: boolean; | ||||
|     actual?: any; | ||||
|     error?: any; | ||||
|     expected?: any; | ||||
|     message?: string | null; | ||||
| }; | ||||
| export default function expectationResultFactory(options: Options, initError?: Error): FailedAssertion; | ||||
| //# sourceMappingURL=expectationResultFactory.d.ts.map | ||||
							
								
								
									
										1
									
								
								node_modules/jest-jasmine2/build/expectationResultFactory.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/jest-jasmine2/build/expectationResultFactory.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| {"version":3,"file":"expectationResultFactory.d.ts","sourceRoot":"","sources":["../src/expectationResultFactory.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAkDlD,oBAAY,OAAO,GAAG;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAC9C,OAAO,EAAE,OAAO,EAChB,SAAS,CAAC,EAAE,KAAK,GAChB,eAAe,CAuBjB"} | ||||
							
								
								
									
										93
									
								
								node_modules/jest-jasmine2/build/expectationResultFactory.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										93
									
								
								node_modules/jest-jasmine2/build/expectationResultFactory.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,93 @@ | ||||
| 'use strict'; | ||||
|  | ||||
| Object.defineProperty(exports, '__esModule', { | ||||
|   value: true | ||||
| }); | ||||
| exports.default = expectationResultFactory; | ||||
|  | ||||
| var _prettyFormat = _interopRequireDefault(require('pretty-format')); | ||||
|  | ||||
| function _interopRequireDefault(obj) { | ||||
|   return obj && obj.__esModule ? obj : {default: obj}; | ||||
| } | ||||
|  | ||||
| /** | ||||
|  * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||||
|  * | ||||
|  * This source code is licensed under the MIT license found in the | ||||
|  * LICENSE file in the root directory of this source tree. | ||||
|  */ | ||||
| function messageFormatter({error, message, passed}) { | ||||
|   if (passed) { | ||||
|     return 'Passed.'; | ||||
|   } | ||||
|  | ||||
|   if (message) { | ||||
|     return message; | ||||
|   } | ||||
|  | ||||
|   if (typeof error === 'string') { | ||||
|     return error; | ||||
|   } | ||||
|  | ||||
|   if ( | ||||
|     // duck-type Error, see #2549 | ||||
|     error && | ||||
|     typeof error === 'object' && | ||||
|     typeof error.message === 'string' && | ||||
|     typeof error.name === 'string' | ||||
|   ) { | ||||
|     return `${error.name}: ${error.message}`; | ||||
|   } | ||||
|  | ||||
|   return `thrown: ${(0, _prettyFormat.default)(error, { | ||||
|     maxDepth: 3 | ||||
|   })}`; | ||||
| } | ||||
|  | ||||
| function stackFormatter(options, initError, errorMessage) { | ||||
|   if (options.passed) { | ||||
|     return ''; | ||||
|   } | ||||
|  | ||||
|   if (options.error) { | ||||
|     if (options.error.stack) { | ||||
|       return options.error.stack; | ||||
|     } | ||||
|  | ||||
|     if (options.error === errorMessage) { | ||||
|       return errorMessage; | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   if (initError) { | ||||
|     return errorMessage.trimRight() + '\n\n' + initError.stack; | ||||
|   } | ||||
|  | ||||
|   return new Error(errorMessage).stack; | ||||
| } | ||||
|  | ||||
| function expectationResultFactory(options, initError) { | ||||
|   const message = messageFormatter(options); | ||||
|   const stack = stackFormatter(options, initError, message); | ||||
|  | ||||
|   if (options.passed) { | ||||
|     return { | ||||
|       error: options.error, | ||||
|       matcherName: options.matcherName, | ||||
|       message, | ||||
|       passed: options.passed, | ||||
|       stack | ||||
|     }; | ||||
|   } | ||||
|  | ||||
|   return { | ||||
|     actual: options.actual, | ||||
|     error: options.error, | ||||
|     expected: options.expected, | ||||
|     matcherName: options.matcherName, | ||||
|     message, | ||||
|     passed: options.passed, | ||||
|     stack | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										17
									
								
								node_modules/jest-jasmine2/build/index.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								node_modules/jest-jasmine2/build/index.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,17 @@ | ||||
| /** | ||||
|  * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||||
|  * | ||||
|  * This source code is licensed under the MIT license found in the | ||||
|  * LICENSE file in the root directory of this source tree. | ||||
|  */ | ||||
| import { Config } from '@jest/types'; | ||||
| import { TestResult } from '@jest/test-result'; | ||||
| import { JestEnvironment } from '@jest/environment'; | ||||
| import Runtime from 'jest-runtime'; | ||||
| import { Jasmine as JestJasmine } from './types'; | ||||
| declare function jasmine2(globalConfig: Config.GlobalConfig, config: Config.ProjectConfig, environment: JestEnvironment, runtime: Runtime, testPath: string): Promise<TestResult>; | ||||
| declare namespace jasmine2 { | ||||
|     type Jasmine = JestJasmine; | ||||
| } | ||||
| export = jasmine2; | ||||
| //# sourceMappingURL=index.d.ts.map | ||||
							
								
								
									
										1
									
								
								node_modules/jest-jasmine2/build/index.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/jest-jasmine2/build/index.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,MAAM,EAAS,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAkB,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAElD,OAAO,OAAO,MAAM,cAAc,CAAC;AAQnC,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,SAAS,CAAC;AAI/C,iBAAe,QAAQ,CACrB,YAAY,EAAE,MAAM,CAAC,YAAY,EACjC,MAAM,EAAE,MAAM,CAAC,aAAa,EAC5B,WAAW,EAAE,eAAe,EAC5B,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,UAAU,CAAC,CA+IrB;AAmCD,kBAAU,QAAQ,CAAC;IACjB,KAAY,OAAO,GAAG,WAAW,CAAC;CACnC;AAED,SAAS,QAAQ,CAAC"} | ||||
							
								
								
									
										237
									
								
								node_modules/jest-jasmine2/build/index.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										237
									
								
								node_modules/jest-jasmine2/build/index.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,237 @@ | ||||
| 'use strict'; | ||||
|  | ||||
| var _path = _interopRequireDefault(require('path')); | ||||
|  | ||||
| var _jestUtil = require('jest-util'); | ||||
|  | ||||
| var _each = _interopRequireDefault(require('./each')); | ||||
|  | ||||
| var _errorOnPrivate = require('./errorOnPrivate'); | ||||
|  | ||||
| var _reporter = _interopRequireDefault(require('./reporter')); | ||||
|  | ||||
| var _jasmineAsyncInstall = _interopRequireDefault( | ||||
|   require('./jasmineAsyncInstall') | ||||
| ); | ||||
|  | ||||
| function _interopRequireDefault(obj) { | ||||
|   return obj && obj.__esModule ? obj : {default: obj}; | ||||
| } | ||||
|  | ||||
| var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; | ||||
| var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; | ||||
| var Promise = global[Symbol.for('jest-native-promise')] || global.Promise; | ||||
|  | ||||
| function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { | ||||
|   try { | ||||
|     var info = gen[key](arg); | ||||
|     var value = info.value; | ||||
|   } catch (error) { | ||||
|     reject(error); | ||||
|     return; | ||||
|   } | ||||
|   if (info.done) { | ||||
|     resolve(value); | ||||
|   } else { | ||||
|     Promise.resolve(value).then(_next, _throw); | ||||
|   } | ||||
| } | ||||
|  | ||||
| function _asyncToGenerator(fn) { | ||||
|   return function() { | ||||
|     var self = this, | ||||
|       args = arguments; | ||||
|     return new Promise(function(resolve, reject) { | ||||
|       var gen = fn.apply(self, args); | ||||
|       function _next(value) { | ||||
|         asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'next', value); | ||||
|       } | ||||
|       function _throw(err) { | ||||
|         asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err); | ||||
|       } | ||||
|       _next(undefined); | ||||
|     }); | ||||
|   }; | ||||
| } | ||||
|  | ||||
| const JASMINE = require.resolve('./jasmine/jasmineLight'); | ||||
|  | ||||
| function jasmine2(_x, _x2, _x3, _x4, _x5) { | ||||
|   return _jasmine.apply(this, arguments); | ||||
| } | ||||
|  | ||||
| function _jasmine() { | ||||
|   _jasmine = _asyncToGenerator(function*( | ||||
|     globalConfig, | ||||
|     config, | ||||
|     environment, | ||||
|     runtime, | ||||
|     testPath | ||||
|   ) { | ||||
|     const reporter = new _reporter.default(globalConfig, config, testPath); | ||||
|     const jasmineFactory = runtime.requireInternalModule(JASMINE); | ||||
|     const jasmine = jasmineFactory.create({ | ||||
|       process, | ||||
|       testPath, | ||||
|       testTimeout: globalConfig.testTimeout | ||||
|     }); | ||||
|     const env = jasmine.getEnv(); | ||||
|     const jasmineInterface = jasmineFactory.interface(jasmine, env); | ||||
|     Object.assign(environment.global, jasmineInterface); | ||||
|     env.addReporter(jasmineInterface.jsApiReporter); // TODO: Remove config option if V8 exposes some way of getting location of caller | ||||
|     // in a future version | ||||
|  | ||||
|     if (config.testLocationInResults === true) { | ||||
|       const originalIt = environment.global.it; | ||||
|  | ||||
|       environment.global.it = (...args) => { | ||||
|         const stack = (0, _jestUtil.getCallsite)(1, runtime.getSourceMaps()); | ||||
|         const it = originalIt(...args); // @ts-ignore | ||||
|  | ||||
|         it.result.__callsite = stack; | ||||
|         return it; | ||||
|       }; | ||||
|  | ||||
|       const originalXit = environment.global.xit; | ||||
|  | ||||
|       environment.global.xit = (...args) => { | ||||
|         const stack = (0, _jestUtil.getCallsite)(1, runtime.getSourceMaps()); | ||||
|         const xit = originalXit(...args); // @ts-ignore | ||||
|  | ||||
|         xit.result.__callsite = stack; | ||||
|         return xit; | ||||
|       }; | ||||
|  | ||||
|       const originalFit = environment.global.fit; | ||||
|  | ||||
|       environment.global.fit = (...args) => { | ||||
|         const stack = (0, _jestUtil.getCallsite)(1, runtime.getSourceMaps()); | ||||
|         const fit = originalFit(...args); // @ts-ignore | ||||
|  | ||||
|         fit.result.__callsite = stack; | ||||
|         return fit; | ||||
|       }; | ||||
|     } | ||||
|  | ||||
|     (0, _jasmineAsyncInstall.default)(globalConfig, environment.global); | ||||
|     (0, _each.default)(environment); | ||||
|     environment.global.test = environment.global.it; | ||||
|     environment.global.it.only = environment.global.fit; | ||||
|     environment.global.it.todo = env.todo; | ||||
|     environment.global.it.skip = environment.global.xit; | ||||
|     environment.global.xtest = environment.global.xit; | ||||
|     environment.global.describe.skip = environment.global.xdescribe; | ||||
|     environment.global.describe.only = environment.global.fdescribe; | ||||
|  | ||||
|     if (config.timers === 'fake') { | ||||
|       environment.fakeTimers.useFakeTimers(); | ||||
|     } | ||||
|  | ||||
|     env.beforeEach(() => { | ||||
|       if (config.resetModules) { | ||||
|         runtime.resetModules(); | ||||
|       } | ||||
|  | ||||
|       if (config.clearMocks) { | ||||
|         runtime.clearAllMocks(); | ||||
|       } | ||||
|  | ||||
|       if (config.resetMocks) { | ||||
|         runtime.resetAllMocks(); | ||||
|  | ||||
|         if (config.timers === 'fake') { | ||||
|           environment.fakeTimers.useFakeTimers(); | ||||
|         } | ||||
|       } | ||||
|  | ||||
|       if (config.restoreMocks) { | ||||
|         runtime.restoreAllMocks(); | ||||
|       } | ||||
|     }); | ||||
|     env.addReporter(reporter); | ||||
|     runtime | ||||
|       .requireInternalModule( | ||||
|         _path.default.resolve(__dirname, './jestExpect.js') | ||||
|       ) | ||||
|       .default({ | ||||
|         expand: globalConfig.expand | ||||
|       }); | ||||
|  | ||||
|     if (globalConfig.errorOnDeprecated) { | ||||
|       (0, _errorOnPrivate.installErrorOnPrivate)(environment.global); | ||||
|     } else { | ||||
|       Object.defineProperty(jasmine, 'DEFAULT_TIMEOUT_INTERVAL', { | ||||
|         configurable: true, | ||||
|         enumerable: true, | ||||
|  | ||||
|         get() { | ||||
|           return this._DEFAULT_TIMEOUT_INTERVAL; | ||||
|         }, | ||||
|  | ||||
|         set(value) { | ||||
|           this._DEFAULT_TIMEOUT_INTERVAL = value; | ||||
|         } | ||||
|       }); | ||||
|     } | ||||
|  | ||||
|     const snapshotState = runtime | ||||
|       .requireInternalModule( | ||||
|         _path.default.resolve(__dirname, './setup_jest_globals.js') | ||||
|       ) | ||||
|       .default({ | ||||
|         config, | ||||
|         globalConfig, | ||||
|         localRequire: runtime.requireModule.bind(runtime), | ||||
|         testPath | ||||
|       }); | ||||
|     config.setupFilesAfterEnv.forEach(path => runtime.requireModule(path)); | ||||
|  | ||||
|     if (globalConfig.enabledTestsMap) { | ||||
|       env.specFilter = spec => { | ||||
|         const suiteMap = | ||||
|           globalConfig.enabledTestsMap && | ||||
|           globalConfig.enabledTestsMap[spec.result.testPath]; | ||||
|         return suiteMap && suiteMap[spec.result.fullName]; | ||||
|       }; | ||||
|     } else if (globalConfig.testNamePattern) { | ||||
|       const testNameRegex = new RegExp(globalConfig.testNamePattern, 'i'); | ||||
|  | ||||
|       env.specFilter = spec => testNameRegex.test(spec.getFullName()); | ||||
|     } | ||||
|  | ||||
|     runtime.requireModule(testPath); | ||||
|     yield env.execute(); | ||||
|     const results = yield reporter.getResults(); | ||||
|     return addSnapshotData(results, snapshotState); | ||||
|   }); | ||||
|   return _jasmine.apply(this, arguments); | ||||
| } | ||||
|  | ||||
| const addSnapshotData = (results, snapshotState) => { | ||||
|   results.testResults.forEach(({fullName, status}) => { | ||||
|     if (status === 'pending' || status === 'failed') { | ||||
|       // if test is skipped or failed, we don't want to mark | ||||
|       // its snapshots as obsolete. | ||||
|       snapshotState.markSnapshotsAsCheckedForTest(fullName); | ||||
|     } | ||||
|   }); | ||||
|   const uncheckedCount = snapshotState.getUncheckedCount(); | ||||
|   const uncheckedKeys = snapshotState.getUncheckedKeys(); | ||||
|  | ||||
|   if (uncheckedCount) { | ||||
|     snapshotState.removeUncheckedKeys(); | ||||
|   } | ||||
|  | ||||
|   const status = snapshotState.save(); | ||||
|   results.snapshot.fileDeleted = status.deleted; | ||||
|   results.snapshot.added = snapshotState.added; | ||||
|   results.snapshot.matched = snapshotState.matched; | ||||
|   results.snapshot.unmatched = snapshotState.unmatched; | ||||
|   results.snapshot.updated = snapshotState.updated; | ||||
|   results.snapshot.unchecked = !status.deleted ? uncheckedCount : 0; // Copy the array to prevent memory leaks | ||||
|  | ||||
|   results.snapshot.uncheckedKeys = Array.from(uncheckedKeys); | ||||
|   return results; | ||||
| }; // eslint-disable-next-line no-redeclare | ||||
|  | ||||
| module.exports = jasmine2; | ||||
							
								
								
									
										11
									
								
								node_modules/jest-jasmine2/build/isError.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								node_modules/jest-jasmine2/build/isError.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,11 @@ | ||||
| /** | ||||
|  * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||||
|  * | ||||
|  * This source code is licensed under the MIT license found in the | ||||
|  * LICENSE file in the root directory of this source tree. | ||||
|  */ | ||||
| export default function isError(potentialError: any): { | ||||
|     isError: boolean; | ||||
|     message: string | null; | ||||
| }; | ||||
| //# sourceMappingURL=isError.d.ts.map | ||||
							
								
								
									
										1
									
								
								node_modules/jest-jasmine2/build/isError.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/jest-jasmine2/build/isError.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| {"version":3,"file":"isError.d.ts","sourceRoot":"","sources":["../src/isError.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,cAAc,EAAE,GAAG;;;EAalD"} | ||||
							
								
								
									
										36
									
								
								node_modules/jest-jasmine2/build/isError.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								node_modules/jest-jasmine2/build/isError.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,36 @@ | ||||
| 'use strict'; | ||||
|  | ||||
| Object.defineProperty(exports, '__esModule', { | ||||
|   value: true | ||||
| }); | ||||
| exports.default = isError; | ||||
|  | ||||
| var _prettyFormat = _interopRequireDefault(require('pretty-format')); | ||||
|  | ||||
| function _interopRequireDefault(obj) { | ||||
|   return obj && obj.__esModule ? obj : {default: obj}; | ||||
| } | ||||
|  | ||||
| /** | ||||
|  * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||||
|  * | ||||
|  * This source code is licensed under the MIT license found in the | ||||
|  * LICENSE file in the root directory of this source tree. | ||||
|  */ | ||||
| function isError(potentialError) { | ||||
|   // duck-type Error, see #2549 | ||||
|   const isError = | ||||
|     potentialError !== null && | ||||
|     typeof potentialError === 'object' && | ||||
|     typeof potentialError.message === 'string' && | ||||
|     typeof potentialError.name === 'string'; | ||||
|   const message = isError | ||||
|     ? null | ||||
|     : `Failed: ${(0, _prettyFormat.default)(potentialError, { | ||||
|         maxDepth: 3 | ||||
|       })}`; | ||||
|   return { | ||||
|     isError, | ||||
|     message | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										26
									
								
								node_modules/jest-jasmine2/build/jasmine/CallTracker.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								node_modules/jest-jasmine2/build/jasmine/CallTracker.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,26 @@ | ||||
| /** | ||||
|  * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||||
|  * | ||||
|  * This source code is licensed under the MIT license found in the | ||||
|  * LICENSE file in the root directory of this source tree. | ||||
|  * | ||||
|  */ | ||||
| export declare type Context = { | ||||
|     object: unknown; | ||||
|     args: Array<unknown>; | ||||
|     returnValue?: unknown; | ||||
| }; | ||||
| declare class CallTracker { | ||||
|     track: (context: Context) => void; | ||||
|     any: () => boolean; | ||||
|     count: () => number; | ||||
|     argsFor: (index: number) => Array<unknown>; | ||||
|     all: () => Array<Context>; | ||||
|     allArgs: () => Array<unknown>; | ||||
|     first: () => Context; | ||||
|     mostRecent: () => Context; | ||||
|     reset: () => void; | ||||
|     constructor(); | ||||
| } | ||||
| export default CallTracker; | ||||
| //# sourceMappingURL=CallTracker.d.ts.map | ||||
							
								
								
									
										1
									
								
								node_modules/jest-jasmine2/build/jasmine/CallTracker.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/jest-jasmine2/build/jasmine/CallTracker.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| {"version":3,"file":"CallTracker.d.ts","sourceRoot":"","sources":["../../src/jasmine/CallTracker.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAyBH,oBAAY,OAAO,GAAG;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,cAAM,WAAW;IACf,KAAK,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAClC,GAAG,EAAE,MAAM,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,MAAM,CAAC;IACpB,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,KAAK,CAAC,OAAO,CAAC,CAAC;IAC3C,GAAG,EAAE,MAAM,KAAK,CAAC,OAAO,CAAC,CAAC;IAC1B,OAAO,EAAE,MAAM,KAAK,CAAC,OAAO,CAAC,CAAC;IAC9B,KAAK,EAAE,MAAM,OAAO,CAAC;IACrB,UAAU,EAAE,MAAM,OAAO,CAAC;IAC1B,KAAK,EAAE,MAAM,IAAI,CAAC;;CA+CnB;AAED,eAAe,WAAW,CAAC"} | ||||
							
								
								
									
										121
									
								
								node_modules/jest-jasmine2/build/jasmine/CallTracker.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										121
									
								
								node_modules/jest-jasmine2/build/jasmine/CallTracker.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,121 @@ | ||||
| 'use strict'; | ||||
|  | ||||
| Object.defineProperty(exports, '__esModule', { | ||||
|   value: true | ||||
| }); | ||||
| exports.default = void 0; | ||||
|  | ||||
| function _defineProperty(obj, key, value) { | ||||
|   if (key in obj) { | ||||
|     Object.defineProperty(obj, key, { | ||||
|       value: value, | ||||
|       enumerable: true, | ||||
|       configurable: true, | ||||
|       writable: true | ||||
|     }); | ||||
|   } else { | ||||
|     obj[key] = value; | ||||
|   } | ||||
|   return obj; | ||||
| } | ||||
|  | ||||
| /** | ||||
|  * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||||
|  * | ||||
|  * This source code is licensed under the MIT license found in the | ||||
|  * LICENSE file in the root directory of this source tree. | ||||
|  * | ||||
|  */ | ||||
| // This file is a heavily modified fork of Jasmine. Original license: | ||||
|  | ||||
| /* | ||||
| Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||||
|  | ||||
| Permission is hereby granted, free of charge, to any person obtaining | ||||
| a copy of this software and associated documentation files (the | ||||
| "Software"), to deal in the Software without restriction, including | ||||
| without limitation the rights to use, copy, modify, merge, publish, | ||||
| distribute, sublicense, and/or sell copies of the Software, and to | ||||
| permit persons to whom the Software is furnished to do so, subject to | ||||
| the following conditions: | ||||
|  | ||||
| The above copyright notice and this permission notice shall be | ||||
| included in all copies or substantial portions of the Software. | ||||
|  | ||||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||||
| EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||||
| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||||
| NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||||
| LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||||
| OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||||
| WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||||
| */ | ||||
| class CallTracker { | ||||
|   constructor() { | ||||
|     _defineProperty(this, 'track', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'any', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'count', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'argsFor', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'all', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'allArgs', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'first', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'mostRecent', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'reset', void 0); | ||||
|  | ||||
|     let calls = []; | ||||
|  | ||||
|     this.track = function(context) { | ||||
|       calls.push(context); | ||||
|     }; | ||||
|  | ||||
|     this.any = function() { | ||||
|       return !!calls.length; | ||||
|     }; | ||||
|  | ||||
|     this.count = function() { | ||||
|       return calls.length; | ||||
|     }; | ||||
|  | ||||
|     this.argsFor = function(index) { | ||||
|       const call = calls[index]; | ||||
|       return call ? call.args : []; | ||||
|     }; | ||||
|  | ||||
|     this.all = function() { | ||||
|       return calls; | ||||
|     }; | ||||
|  | ||||
|     this.allArgs = function() { | ||||
|       const callArgs = []; | ||||
|  | ||||
|       for (let i = 0; i < calls.length; i++) { | ||||
|         callArgs.push(calls[i].args); | ||||
|       } | ||||
|  | ||||
|       return callArgs; | ||||
|     }; | ||||
|  | ||||
|     this.first = function() { | ||||
|       return calls[0]; | ||||
|     }; | ||||
|  | ||||
|     this.mostRecent = function() { | ||||
|       return calls[calls.length - 1]; | ||||
|     }; | ||||
|  | ||||
|     this.reset = function() { | ||||
|       calls = []; | ||||
|     }; | ||||
|   } | ||||
| } | ||||
|  | ||||
| var _default = CallTracker; | ||||
| exports.default = _default; | ||||
							
								
								
									
										43
									
								
								node_modules/jest-jasmine2/build/jasmine/Env.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								node_modules/jest-jasmine2/build/jasmine/Env.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,43 @@ | ||||
| /** | ||||
|  * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||||
|  * | ||||
|  * This source code is licensed under the MIT license found in the | ||||
|  * LICENSE file in the root directory of this source tree. | ||||
|  * | ||||
|  */ | ||||
| import { Jasmine, AssertionErrorWithStack, Reporter, Spy } from '../types'; | ||||
| import Spec from './Spec'; | ||||
| import Suite from './Suite'; | ||||
| export default function (j$: Jasmine): { | ||||
|     new (_options?: object | undefined): { | ||||
|         specFilter: (spec: Spec) => boolean; | ||||
|         catchExceptions: (value: unknown) => boolean; | ||||
|         throwOnExpectationFailure: (value: unknown) => void; | ||||
|         catchingExceptions: () => boolean; | ||||
|         topSuite: () => Suite; | ||||
|         fail: (error: Error | AssertionErrorWithStack) => void; | ||||
|         pending: (message: string) => void; | ||||
|         afterAll: (afterAllFunction: (done: (error?: any) => void) => void, timeout?: number | undefined) => void; | ||||
|         fit: (description: string, fn: (done: (error?: any) => void) => void, timeout?: number | undefined) => void; | ||||
|         throwingExpectationFailures: () => boolean; | ||||
|         randomizeTests: (value: unknown) => void; | ||||
|         randomTests: () => boolean; | ||||
|         seed: (value: unknown) => unknown; | ||||
|         execute: (runnablesToRun: string[], suiteTree?: Suite | undefined) => Promise<void>; | ||||
|         fdescribe: (description: string, specDefinitions: Function) => Suite; | ||||
|         spyOn: (obj: Record<string, any>, methodName: string, accessType?: "configurable" | "enumerable" | "value" | "writable" | "get" | "set" | undefined) => Spy; | ||||
|         beforeEach: (beforeEachFunction: (done: (error?: any) => void) => void, timeout?: number | undefined) => void; | ||||
|         afterEach: (afterEachFunction: (done: (error?: any) => void) => void, timeout?: number | undefined) => void; | ||||
|         clearReporters: () => void; | ||||
|         addReporter: (reporterToAdd: Reporter) => void; | ||||
|         it: (description: string, fn: (done: (error?: any) => void) => void, timeout?: number | undefined) => Spec; | ||||
|         xdescribe: (description: string, specDefinitions: Function) => Suite; | ||||
|         xit: (description: string, fn: (done: (error?: any) => void) => void, timeout?: number | undefined) => any; | ||||
|         beforeAll: (beforeAllFunction: (done: (error?: any) => void) => void, timeout?: number | undefined) => void; | ||||
|         todo: () => Spec; | ||||
|         provideFallbackReporter: (reporterToAdd: Reporter) => void; | ||||
|         allowRespy: (allow: boolean) => void; | ||||
|         describe: (description: string, specDefinitions: Function) => Suite; | ||||
|     }; | ||||
| }; | ||||
| //# sourceMappingURL=Env.d.ts.map | ||||
							
								
								
									
										1
									
								
								node_modules/jest-jasmine2/build/jasmine/Env.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/jest-jasmine2/build/jasmine/Env.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| {"version":3,"file":"Env.d.ts","sourceRoot":"","sources":["../../src/jasmine/Env.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAqCH,OAAO,EAAC,OAAO,EAAE,uBAAuB,EAAE,QAAQ,EAAE,GAAG,EAAC,MAAM,UAAU,CAAC;AACzE,OAAO,IAAkB,MAAM,QAAQ,CAAC;AACxC,OAAO,KAAK,MAAM,SAAS,CAAC;AAE5B,MAAM,CAAC,OAAO,WAAU,EAAE,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6oBlC"} | ||||
							
								
								
									
										801
									
								
								node_modules/jest-jasmine2/build/jasmine/Env.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										801
									
								
								node_modules/jest-jasmine2/build/jasmine/Env.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,801 @@ | ||||
| 'use strict'; | ||||
|  | ||||
| Object.defineProperty(exports, '__esModule', { | ||||
|   value: true | ||||
| }); | ||||
| exports.default = _default; | ||||
|  | ||||
| var _assert = require('assert'); | ||||
|  | ||||
| var _chalk = _interopRequireDefault(require('chalk')); | ||||
|  | ||||
| var _jestMessageUtil = require('jest-message-util'); | ||||
|  | ||||
| var _jestUtil = require('jest-util'); | ||||
|  | ||||
| var _queueRunner = _interopRequireDefault(require('../queueRunner')); | ||||
|  | ||||
| var _treeProcessor = _interopRequireDefault(require('../treeProcessor')); | ||||
|  | ||||
| var _isError = _interopRequireDefault(require('../isError')); | ||||
|  | ||||
| var _assertionErrorMessage = _interopRequireDefault( | ||||
|   require('../assertionErrorMessage') | ||||
| ); | ||||
|  | ||||
| function _interopRequireDefault(obj) { | ||||
|   return obj && obj.__esModule ? obj : {default: obj}; | ||||
| } | ||||
|  | ||||
| var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; | ||||
| var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; | ||||
| var Promise = global[Symbol.for('jest-native-promise')] || global.Promise; | ||||
|  | ||||
| function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { | ||||
|   try { | ||||
|     var info = gen[key](arg); | ||||
|     var value = info.value; | ||||
|   } catch (error) { | ||||
|     reject(error); | ||||
|     return; | ||||
|   } | ||||
|   if (info.done) { | ||||
|     resolve(value); | ||||
|   } else { | ||||
|     Promise.resolve(value).then(_next, _throw); | ||||
|   } | ||||
| } | ||||
|  | ||||
| function _asyncToGenerator(fn) { | ||||
|   return function() { | ||||
|     var self = this, | ||||
|       args = arguments; | ||||
|     return new Promise(function(resolve, reject) { | ||||
|       var gen = fn.apply(self, args); | ||||
|       function _next(value) { | ||||
|         asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'next', value); | ||||
|       } | ||||
|       function _throw(err) { | ||||
|         asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err); | ||||
|       } | ||||
|       _next(undefined); | ||||
|     }); | ||||
|   }; | ||||
| } | ||||
|  | ||||
| function _defineProperty(obj, key, value) { | ||||
|   if (key in obj) { | ||||
|     Object.defineProperty(obj, key, { | ||||
|       value: value, | ||||
|       enumerable: true, | ||||
|       configurable: true, | ||||
|       writable: true | ||||
|     }); | ||||
|   } else { | ||||
|     obj[key] = value; | ||||
|   } | ||||
|   return obj; | ||||
| } | ||||
|  | ||||
| function _default(j$) { | ||||
|   var _temp; | ||||
|  | ||||
|   return ( | ||||
|     (_temp = class Env { | ||||
|       constructor(_options) { | ||||
|         _defineProperty(this, 'specFilter', void 0); | ||||
|  | ||||
|         _defineProperty(this, 'catchExceptions', void 0); | ||||
|  | ||||
|         _defineProperty(this, 'throwOnExpectationFailure', void 0); | ||||
|  | ||||
|         _defineProperty(this, 'catchingExceptions', void 0); | ||||
|  | ||||
|         _defineProperty(this, 'topSuite', void 0); | ||||
|  | ||||
|         _defineProperty(this, 'fail', void 0); | ||||
|  | ||||
|         _defineProperty(this, 'pending', void 0); | ||||
|  | ||||
|         _defineProperty(this, 'afterAll', void 0); | ||||
|  | ||||
|         _defineProperty(this, 'fit', void 0); | ||||
|  | ||||
|         _defineProperty(this, 'throwingExpectationFailures', void 0); | ||||
|  | ||||
|         _defineProperty(this, 'randomizeTests', void 0); | ||||
|  | ||||
|         _defineProperty(this, 'randomTests', void 0); | ||||
|  | ||||
|         _defineProperty(this, 'seed', void 0); | ||||
|  | ||||
|         _defineProperty(this, 'execute', void 0); | ||||
|  | ||||
|         _defineProperty(this, 'fdescribe', void 0); | ||||
|  | ||||
|         _defineProperty(this, 'spyOn', void 0); | ||||
|  | ||||
|         _defineProperty(this, 'beforeEach', void 0); | ||||
|  | ||||
|         _defineProperty(this, 'afterEach', void 0); | ||||
|  | ||||
|         _defineProperty(this, 'clearReporters', void 0); | ||||
|  | ||||
|         _defineProperty(this, 'addReporter', void 0); | ||||
|  | ||||
|         _defineProperty(this, 'it', void 0); | ||||
|  | ||||
|         _defineProperty(this, 'xdescribe', void 0); | ||||
|  | ||||
|         _defineProperty(this, 'xit', void 0); | ||||
|  | ||||
|         _defineProperty(this, 'beforeAll', void 0); | ||||
|  | ||||
|         _defineProperty(this, 'todo', void 0); | ||||
|  | ||||
|         _defineProperty(this, 'provideFallbackReporter', void 0); | ||||
|  | ||||
|         _defineProperty(this, 'allowRespy', void 0); | ||||
|  | ||||
|         _defineProperty(this, 'describe', void 0); | ||||
|  | ||||
|         let totalSpecsDefined = 0; | ||||
|         let catchExceptions = true; | ||||
|         const realSetTimeout = global.setTimeout; | ||||
|         const realClearTimeout = global.clearTimeout; | ||||
|         const runnableResources = {}; | ||||
|         const currentlyExecutingSuites = []; | ||||
|         let currentSpec = null; | ||||
|         let throwOnExpectationFailure = false; | ||||
|         let random = false; | ||||
|         let seed = null; | ||||
|         let nextSpecId = 0; | ||||
|         let nextSuiteId = 0; | ||||
|  | ||||
|         const getNextSpecId = function getNextSpecId() { | ||||
|           return 'spec' + nextSpecId++; | ||||
|         }; | ||||
|  | ||||
|         const getNextSuiteId = function getNextSuiteId() { | ||||
|           return 'suite' + nextSuiteId++; | ||||
|         }; | ||||
|  | ||||
|         const topSuite = new j$.Suite({ | ||||
|           id: getNextSuiteId(), | ||||
|           description: '', | ||||
|  | ||||
|           getTestPath() { | ||||
|             return j$.testPath; | ||||
|           } | ||||
|         }); | ||||
|         let currentDeclarationSuite = topSuite; | ||||
|  | ||||
|         const currentSuite = function currentSuite() { | ||||
|           return currentlyExecutingSuites[currentlyExecutingSuites.length - 1]; | ||||
|         }; | ||||
|  | ||||
|         const currentRunnable = function currentRunnable() { | ||||
|           return currentSpec || currentSuite(); | ||||
|         }; | ||||
|  | ||||
|         const reporter = new j$.ReportDispatcher([ | ||||
|           'jasmineStarted', | ||||
|           'jasmineDone', | ||||
|           'suiteStarted', | ||||
|           'suiteDone', | ||||
|           'specStarted', | ||||
|           'specDone' | ||||
|         ]); | ||||
|  | ||||
|         this.specFilter = function() { | ||||
|           return true; | ||||
|         }; | ||||
|  | ||||
|         const defaultResourcesForRunnable = function defaultResourcesForRunnable( | ||||
|           id, | ||||
|           _parentRunnableId | ||||
|         ) { | ||||
|           const resources = { | ||||
|             spies: [] | ||||
|           }; | ||||
|           runnableResources[id] = resources; | ||||
|         }; | ||||
|  | ||||
|         const clearResourcesForRunnable = function clearResourcesForRunnable( | ||||
|           id | ||||
|         ) { | ||||
|           spyRegistry.clearSpies(); | ||||
|           delete runnableResources[id]; | ||||
|         }; | ||||
|  | ||||
|         const beforeAndAfterFns = function beforeAndAfterFns(suite) { | ||||
|           return function() { | ||||
|             let afters = []; | ||||
|             let befores = []; | ||||
|  | ||||
|             while (suite) { | ||||
|               befores = befores.concat(suite.beforeFns); | ||||
|               afters = afters.concat(suite.afterFns); | ||||
|               suite = suite.parentSuite; | ||||
|             } | ||||
|  | ||||
|             return { | ||||
|               befores: befores.reverse(), | ||||
|               afters | ||||
|             }; | ||||
|           }; | ||||
|         }; | ||||
|  | ||||
|         const getSpecName = function getSpecName(spec, suite) { | ||||
|           const fullName = [spec.description]; | ||||
|           const suiteFullName = suite.getFullName(); | ||||
|  | ||||
|           if (suiteFullName !== '') { | ||||
|             fullName.unshift(suiteFullName); | ||||
|           } | ||||
|  | ||||
|           return fullName.join(' '); | ||||
|         }; | ||||
|  | ||||
|         this.catchExceptions = function(value) { | ||||
|           catchExceptions = !!value; | ||||
|           return catchExceptions; | ||||
|         }; | ||||
|  | ||||
|         this.catchingExceptions = function() { | ||||
|           return catchExceptions; | ||||
|         }; | ||||
|  | ||||
|         this.throwOnExpectationFailure = function(value) { | ||||
|           throwOnExpectationFailure = !!value; | ||||
|         }; | ||||
|  | ||||
|         this.throwingExpectationFailures = function() { | ||||
|           return throwOnExpectationFailure; | ||||
|         }; | ||||
|  | ||||
|         this.randomizeTests = function(value) { | ||||
|           random = !!value; | ||||
|         }; | ||||
|  | ||||
|         this.randomTests = function() { | ||||
|           return random; | ||||
|         }; | ||||
|  | ||||
|         this.seed = function(value) { | ||||
|           if (value) { | ||||
|             seed = value; | ||||
|           } | ||||
|  | ||||
|           return seed; | ||||
|         }; | ||||
|  | ||||
|         const queueRunnerFactory = options => { | ||||
|           options.clearTimeout = realClearTimeout; | ||||
|           options.fail = this.fail; | ||||
|           options.setTimeout = realSetTimeout; | ||||
|           return (0, _queueRunner.default)(options); | ||||
|         }; | ||||
|  | ||||
|         this.topSuite = function() { | ||||
|           return topSuite; | ||||
|         }; | ||||
|  | ||||
|         const uncaught = err => { | ||||
|           if (currentSpec) { | ||||
|             currentSpec.onException(err); | ||||
|             currentSpec.cancel(); | ||||
|           } else { | ||||
|             console.error('Unhandled error'); | ||||
|             console.error(err.stack); | ||||
|           } | ||||
|         }; | ||||
|  | ||||
|         let oldListenersException; | ||||
|         let oldListenersRejection; | ||||
|  | ||||
|         const executionSetup = function executionSetup() { | ||||
|           // Need to ensure we are the only ones handling these exceptions. | ||||
|           oldListenersException = process | ||||
|             .listeners('uncaughtException') | ||||
|             .slice(); | ||||
|           oldListenersRejection = process | ||||
|             .listeners('unhandledRejection') | ||||
|             .slice(); | ||||
|           j$.process.removeAllListeners('uncaughtException'); | ||||
|           j$.process.removeAllListeners('unhandledRejection'); | ||||
|           j$.process.on('uncaughtException', uncaught); | ||||
|           j$.process.on('unhandledRejection', uncaught); | ||||
|         }; | ||||
|  | ||||
|         const executionTeardown = function executionTeardown() { | ||||
|           j$.process.removeListener('uncaughtException', uncaught); | ||||
|           j$.process.removeListener('unhandledRejection', uncaught); // restore previous exception handlers | ||||
|  | ||||
|           oldListenersException.forEach(listener => { | ||||
|             j$.process.on('uncaughtException', listener); | ||||
|           }); | ||||
|           oldListenersRejection.forEach(listener => { | ||||
|             j$.process.on('unhandledRejection', listener); | ||||
|           }); | ||||
|         }; | ||||
|  | ||||
|         this.execute = | ||||
|           /*#__PURE__*/ | ||||
|           (function() { | ||||
|             var _ref = _asyncToGenerator(function*( | ||||
|               runnablesToRun, | ||||
|               suiteTree = topSuite | ||||
|             ) { | ||||
|               if (!runnablesToRun) { | ||||
|                 if (focusedRunnables.length) { | ||||
|                   runnablesToRun = focusedRunnables; | ||||
|                 } else { | ||||
|                   runnablesToRun = [suiteTree.id]; | ||||
|                 } | ||||
|               } | ||||
|  | ||||
|               if (currentlyExecutingSuites.length === 0) { | ||||
|                 executionSetup(); | ||||
|               } | ||||
|  | ||||
|               const lastDeclarationSuite = currentDeclarationSuite; | ||||
|               yield (0, _treeProcessor.default)({ | ||||
|                 nodeComplete(suite) { | ||||
|                   if (!suite.disabled) { | ||||
|                     clearResourcesForRunnable(suite.id); | ||||
|                   } | ||||
|  | ||||
|                   currentlyExecutingSuites.pop(); | ||||
|  | ||||
|                   if (suite === topSuite) { | ||||
|                     reporter.jasmineDone({ | ||||
|                       failedExpectations: topSuite.result.failedExpectations | ||||
|                     }); | ||||
|                   } else { | ||||
|                     reporter.suiteDone(suite.getResult()); | ||||
|                   } | ||||
|                 }, | ||||
|  | ||||
|                 nodeStart(suite) { | ||||
|                   currentlyExecutingSuites.push(suite); | ||||
|                   defaultResourcesForRunnable( | ||||
|                     suite.id, | ||||
|                     suite.parentSuite && suite.parentSuite.id | ||||
|                   ); | ||||
|  | ||||
|                   if (suite === topSuite) { | ||||
|                     reporter.jasmineStarted({ | ||||
|                       totalSpecsDefined | ||||
|                     }); | ||||
|                   } else { | ||||
|                     reporter.suiteStarted(suite.result); | ||||
|                   } | ||||
|                 }, | ||||
|  | ||||
|                 queueRunnerFactory, | ||||
|                 runnableIds: runnablesToRun, | ||||
|                 tree: suiteTree | ||||
|               }); | ||||
|               currentDeclarationSuite = lastDeclarationSuite; | ||||
|  | ||||
|               if (currentlyExecutingSuites.length === 0) { | ||||
|                 executionTeardown(); | ||||
|               } | ||||
|             }); | ||||
|  | ||||
|             return function(_x) { | ||||
|               return _ref.apply(this, arguments); | ||||
|             }; | ||||
|           })(); | ||||
|  | ||||
|         this.addReporter = function(reporterToAdd) { | ||||
|           reporter.addReporter(reporterToAdd); | ||||
|         }; | ||||
|  | ||||
|         this.provideFallbackReporter = function(reporterToAdd) { | ||||
|           reporter.provideFallbackReporter(reporterToAdd); | ||||
|         }; | ||||
|  | ||||
|         this.clearReporters = function() { | ||||
|           reporter.clearReporters(); | ||||
|         }; | ||||
|  | ||||
|         const spyRegistry = new j$.SpyRegistry({ | ||||
|           currentSpies() { | ||||
|             if (!currentRunnable()) { | ||||
|               throw new Error( | ||||
|                 'Spies must be created in a before function or a spec' | ||||
|               ); | ||||
|             } | ||||
|  | ||||
|             return runnableResources[currentRunnable().id].spies; | ||||
|           } | ||||
|         }); | ||||
|  | ||||
|         this.allowRespy = function(allow) { | ||||
|           spyRegistry.allowRespy(allow); | ||||
|         }; | ||||
|  | ||||
|         this.spyOn = function(...args) { | ||||
|           return spyRegistry.spyOn.apply(spyRegistry, args); | ||||
|         }; | ||||
|  | ||||
|         const suiteFactory = function suiteFactory(description) { | ||||
|           const suite = new j$.Suite({ | ||||
|             id: getNextSuiteId(), | ||||
|             description, | ||||
|             parentSuite: currentDeclarationSuite, | ||||
|             throwOnExpectationFailure, | ||||
|  | ||||
|             getTestPath() { | ||||
|               return j$.testPath; | ||||
|             } | ||||
|           }); | ||||
|           return suite; | ||||
|         }; | ||||
|  | ||||
|         this.describe = function(description, specDefinitions) { | ||||
|           const suite = suiteFactory(description); | ||||
|  | ||||
|           if (specDefinitions === undefined) { | ||||
|             throw new Error( | ||||
|               `Missing second argument. It must be a callback function.` | ||||
|             ); | ||||
|           } | ||||
|  | ||||
|           if (typeof specDefinitions !== 'function') { | ||||
|             throw new Error( | ||||
|               `Invalid second argument, ${specDefinitions}. It must be a callback function.` | ||||
|             ); | ||||
|           } | ||||
|  | ||||
|           if (specDefinitions.length > 0) { | ||||
|             throw new Error('describe does not expect any arguments'); | ||||
|           } | ||||
|  | ||||
|           if (currentDeclarationSuite.markedPending) { | ||||
|             suite.pend(); | ||||
|           } | ||||
|  | ||||
|           if (currentDeclarationSuite.markedTodo) { | ||||
|             // @ts-ignore TODO Possible error: Suite does not have todo method | ||||
|             suite.todo(); | ||||
|           } | ||||
|  | ||||
|           addSpecsToSuite(suite, specDefinitions); | ||||
|           return suite; | ||||
|         }; | ||||
|  | ||||
|         this.xdescribe = function(description, specDefinitions) { | ||||
|           const suite = suiteFactory(description); | ||||
|           suite.pend(); | ||||
|           addSpecsToSuite(suite, specDefinitions); | ||||
|           return suite; | ||||
|         }; | ||||
|  | ||||
|         const focusedRunnables = []; | ||||
|  | ||||
|         this.fdescribe = function(description, specDefinitions) { | ||||
|           const suite = suiteFactory(description); | ||||
|           suite.isFocused = true; | ||||
|           focusedRunnables.push(suite.id); | ||||
|           unfocusAncestor(); | ||||
|           addSpecsToSuite(suite, specDefinitions); | ||||
|           return suite; | ||||
|         }; | ||||
|  | ||||
|         const addSpecsToSuite = (suite, specDefinitions) => { | ||||
|           const parentSuite = currentDeclarationSuite; | ||||
|           parentSuite.addChild(suite); | ||||
|           currentDeclarationSuite = suite; | ||||
|           let declarationError = undefined; | ||||
|           let describeReturnValue = undefined; | ||||
|  | ||||
|           try { | ||||
|             describeReturnValue = specDefinitions.call(suite); | ||||
|           } catch (e) { | ||||
|             declarationError = e; | ||||
|           } // TODO throw in Jest 25: declarationError = new Error | ||||
|  | ||||
|           if ((0, _jestUtil.isPromise)(describeReturnValue)) { | ||||
|             console.log( | ||||
|               (0, _jestMessageUtil.formatExecError)( | ||||
|                 new Error( | ||||
|                   _chalk.default.yellow( | ||||
|                     'Returning a Promise from "describe" is not supported. Tests must be defined synchronously.\n' + | ||||
|                       'Returning a value from "describe" will fail the test in a future version of Jest.' | ||||
|                   ) | ||||
|                 ), | ||||
|                 { | ||||
|                   rootDir: '', | ||||
|                   testMatch: [] | ||||
|                 }, | ||||
|                 { | ||||
|                   noStackTrace: false | ||||
|                 } | ||||
|               ) | ||||
|             ); | ||||
|           } else if (describeReturnValue !== undefined) { | ||||
|             console.log( | ||||
|               (0, _jestMessageUtil.formatExecError)( | ||||
|                 new Error( | ||||
|                   _chalk.default.yellow( | ||||
|                     'A "describe" callback must not return a value.\n' + | ||||
|                       'Returning a value from "describe" will fail the test in a future version of Jest.' | ||||
|                   ) | ||||
|                 ), | ||||
|                 { | ||||
|                   rootDir: '', | ||||
|                   testMatch: [] | ||||
|                 }, | ||||
|                 { | ||||
|                   noStackTrace: false | ||||
|                 } | ||||
|               ) | ||||
|             ); | ||||
|           } | ||||
|  | ||||
|           if (declarationError) { | ||||
|             this.it('encountered a declaration exception', () => { | ||||
|               throw declarationError; | ||||
|             }); | ||||
|           } | ||||
|  | ||||
|           currentDeclarationSuite = parentSuite; | ||||
|         }; | ||||
|  | ||||
|         function findFocusedAncestor(suite) { | ||||
|           while (suite) { | ||||
|             if (suite.isFocused) { | ||||
|               return suite.id; | ||||
|             } | ||||
|  | ||||
|             suite = suite.parentSuite; | ||||
|           } | ||||
|  | ||||
|           return null; | ||||
|         } | ||||
|  | ||||
|         function unfocusAncestor() { | ||||
|           const focusedAncestor = findFocusedAncestor(currentDeclarationSuite); | ||||
|  | ||||
|           if (focusedAncestor) { | ||||
|             for (let i = 0; i < focusedRunnables.length; i++) { | ||||
|               if (focusedRunnables[i] === focusedAncestor) { | ||||
|                 focusedRunnables.splice(i, 1); | ||||
|                 break; | ||||
|               } | ||||
|             } | ||||
|           } | ||||
|         } | ||||
|  | ||||
|         const specFactory = (description, fn, suite, timeout) => { | ||||
|           totalSpecsDefined++; | ||||
|           const spec = new j$.Spec({ | ||||
|             id: getNextSpecId(), | ||||
|             beforeAndAfterFns: beforeAndAfterFns(suite), | ||||
|             resultCallback: specResultCallback, | ||||
|  | ||||
|             getSpecName(spec) { | ||||
|               return getSpecName(spec, suite); | ||||
|             }, | ||||
|  | ||||
|             getTestPath() { | ||||
|               return j$.testPath; | ||||
|             }, | ||||
|  | ||||
|             onStart: specStarted, | ||||
|             description, | ||||
|             queueRunnerFactory, | ||||
|  | ||||
|             userContext() { | ||||
|               return suite.clonedSharedUserContext(); | ||||
|             }, | ||||
|  | ||||
|             queueableFn: { | ||||
|               fn, | ||||
|  | ||||
|               timeout() { | ||||
|                 return timeout || j$._DEFAULT_TIMEOUT_INTERVAL; | ||||
|               } | ||||
|             }, | ||||
|             throwOnExpectationFailure | ||||
|           }); | ||||
|  | ||||
|           if (!this.specFilter(spec)) { | ||||
|             spec.disable(); | ||||
|           } | ||||
|  | ||||
|           return spec; | ||||
|  | ||||
|           function specResultCallback(result) { | ||||
|             clearResourcesForRunnable(spec.id); | ||||
|             currentSpec = null; | ||||
|             reporter.specDone(result); | ||||
|           } | ||||
|  | ||||
|           function specStarted(spec) { | ||||
|             currentSpec = spec; | ||||
|             defaultResourcesForRunnable(spec.id, suite.id); | ||||
|             reporter.specStarted(spec.result); | ||||
|           } | ||||
|         }; | ||||
|  | ||||
|         this.it = function(description, fn, timeout) { | ||||
|           if (typeof description !== 'string') { | ||||
|             throw new Error( | ||||
|               `Invalid first argument, ${description}. It must be a string.` | ||||
|             ); | ||||
|           } | ||||
|  | ||||
|           if (fn === undefined) { | ||||
|             throw new Error( | ||||
|               'Missing second argument. It must be a callback function. Perhaps you want to use `test.todo` for a test placeholder.' | ||||
|             ); | ||||
|           } | ||||
|  | ||||
|           if (typeof fn !== 'function') { | ||||
|             throw new Error( | ||||
|               `Invalid second argument, ${fn}. It must be a callback function.` | ||||
|             ); | ||||
|           } | ||||
|  | ||||
|           const spec = specFactory( | ||||
|             description, | ||||
|             fn, | ||||
|             currentDeclarationSuite, | ||||
|             timeout | ||||
|           ); | ||||
|  | ||||
|           if (currentDeclarationSuite.markedPending) { | ||||
|             spec.pend(); | ||||
|           } // When a test is defined inside another, jasmine will not run it. | ||||
|           // This check throws an error to warn the user about the edge-case. | ||||
|  | ||||
|           if (currentSpec !== null) { | ||||
|             throw new Error( | ||||
|               'Tests cannot be nested. Test `' + | ||||
|                 spec.description + | ||||
|                 '` cannot run because it is nested within `' + | ||||
|                 currentSpec.description + | ||||
|                 '`.' | ||||
|             ); | ||||
|           } | ||||
|  | ||||
|           currentDeclarationSuite.addChild(spec); | ||||
|           return spec; | ||||
|         }; | ||||
|  | ||||
|         this.xit = function(...args) { | ||||
|           const spec = this.it.apply(this, args); | ||||
|           spec.pend('Temporarily disabled with xit'); | ||||
|           return spec; | ||||
|         }; | ||||
|  | ||||
|         this.todo = function() { | ||||
|           const description = arguments[0]; | ||||
|  | ||||
|           if (arguments.length !== 1 || typeof description !== 'string') { | ||||
|             throw new _jestUtil.ErrorWithStack( | ||||
|               'Todo must be called with only a description.', | ||||
|               test.todo | ||||
|             ); | ||||
|           } | ||||
|  | ||||
|           const spec = specFactory( | ||||
|             description, | ||||
|             () => {}, | ||||
|             currentDeclarationSuite | ||||
|           ); | ||||
|           spec.todo(); | ||||
|           currentDeclarationSuite.addChild(spec); | ||||
|           return spec; | ||||
|         }; | ||||
|  | ||||
|         this.fit = function(description, fn, timeout) { | ||||
|           const spec = specFactory( | ||||
|             description, | ||||
|             fn, | ||||
|             currentDeclarationSuite, | ||||
|             timeout | ||||
|           ); | ||||
|           currentDeclarationSuite.addChild(spec); | ||||
|           focusedRunnables.push(spec.id); | ||||
|           unfocusAncestor(); | ||||
|           return spec; | ||||
|         }; | ||||
|  | ||||
|         this.beforeEach = function(beforeEachFunction, timeout) { | ||||
|           currentDeclarationSuite.beforeEach({ | ||||
|             fn: beforeEachFunction, | ||||
|  | ||||
|             timeout() { | ||||
|               return timeout || j$._DEFAULT_TIMEOUT_INTERVAL; | ||||
|             } | ||||
|           }); | ||||
|         }; | ||||
|  | ||||
|         this.beforeAll = function(beforeAllFunction, timeout) { | ||||
|           currentDeclarationSuite.beforeAll({ | ||||
|             fn: beforeAllFunction, | ||||
|  | ||||
|             timeout() { | ||||
|               return timeout || j$._DEFAULT_TIMEOUT_INTERVAL; | ||||
|             } | ||||
|           }); | ||||
|         }; | ||||
|  | ||||
|         this.afterEach = function(afterEachFunction, timeout) { | ||||
|           currentDeclarationSuite.afterEach({ | ||||
|             fn: afterEachFunction, | ||||
|  | ||||
|             timeout() { | ||||
|               return timeout || j$._DEFAULT_TIMEOUT_INTERVAL; | ||||
|             } | ||||
|           }); | ||||
|         }; | ||||
|  | ||||
|         this.afterAll = function(afterAllFunction, timeout) { | ||||
|           currentDeclarationSuite.afterAll({ | ||||
|             fn: afterAllFunction, | ||||
|  | ||||
|             timeout() { | ||||
|               return timeout || j$._DEFAULT_TIMEOUT_INTERVAL; | ||||
|             } | ||||
|           }); | ||||
|         }; | ||||
|  | ||||
|         this.pending = function(message) { | ||||
|           let fullMessage = j$.Spec.pendingSpecExceptionMessage; | ||||
|  | ||||
|           if (message) { | ||||
|             fullMessage += message; | ||||
|           } | ||||
|  | ||||
|           throw fullMessage; | ||||
|         }; | ||||
|  | ||||
|         this.fail = function(error) { | ||||
|           let checkIsError; | ||||
|           let message; | ||||
|  | ||||
|           if ( | ||||
|             error instanceof _assert.AssertionError || | ||||
|             (error && error.name === _assert.AssertionError.name) | ||||
|           ) { | ||||
|             checkIsError = false; // @ts-ignore TODO Possible error: j$.Spec does not have expand property | ||||
|  | ||||
|             message = (0, _assertionErrorMessage.default)(error, { | ||||
|               expand: j$.Spec.expand | ||||
|             }); | ||||
|           } else { | ||||
|             const check = (0, _isError.default)(error); | ||||
|             checkIsError = check.isError; | ||||
|             message = check.message; | ||||
|           } | ||||
|  | ||||
|           const errorAsErrorObject = checkIsError ? error : new Error(message); | ||||
|           const runnable = currentRunnable(); | ||||
|  | ||||
|           if (!runnable) { | ||||
|             errorAsErrorObject.message = | ||||
|               'Caught error after test environment was torn down\n\n' + | ||||
|               errorAsErrorObject.message; | ||||
|             throw errorAsErrorObject; | ||||
|           } | ||||
|  | ||||
|           runnable.addExpectationResult(false, { | ||||
|             matcherName: '', | ||||
|             passed: false, | ||||
|             expected: '', | ||||
|             actual: '', | ||||
|             message, | ||||
|             error: errorAsErrorObject | ||||
|           }); | ||||
|         }; | ||||
|       } | ||||
|     }), | ||||
|     _temp | ||||
|   ); | ||||
| } | ||||
							
								
								
									
										32
									
								
								node_modules/jest-jasmine2/build/jasmine/JsApiReporter.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								node_modules/jest-jasmine2/build/jasmine/JsApiReporter.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,32 @@ | ||||
| /** | ||||
|  * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||||
|  * | ||||
|  * This source code is licensed under the MIT license found in the | ||||
|  * LICENSE file in the root directory of this source tree. | ||||
|  * | ||||
|  */ | ||||
| import { Reporter, RunDetails } from '../types'; | ||||
| import { SpecResult } from './Spec'; | ||||
| import { SuiteResult } from './Suite'; | ||||
| import Timer from './Timer'; | ||||
| export default class JsApiReporter implements Reporter { | ||||
|     started: boolean; | ||||
|     finished: boolean; | ||||
|     runDetails: RunDetails; | ||||
|     jasmineStarted: (runDetails: RunDetails) => void; | ||||
|     jasmineDone: (runDetails: RunDetails) => void; | ||||
|     status: () => unknown; | ||||
|     executionTime: () => unknown; | ||||
|     suiteStarted: (result: SuiteResult) => void; | ||||
|     suiteDone: (result: SuiteResult) => void; | ||||
|     suiteResults: (index: number, length: number) => Array<SuiteResult>; | ||||
|     suites: () => Record<string, SuiteResult>; | ||||
|     specResults: (index: number, length: number) => Array<SpecResult>; | ||||
|     specDone: (result: SpecResult) => void; | ||||
|     specs: () => Array<SpecResult>; | ||||
|     specStarted: (spec: SpecResult) => void; | ||||
|     constructor(options: { | ||||
|         timer?: Timer; | ||||
|     }); | ||||
| } | ||||
| //# sourceMappingURL=JsApiReporter.d.ts.map | ||||
							
								
								
									
										1
									
								
								node_modules/jest-jasmine2/build/jasmine/JsApiReporter.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/jest-jasmine2/build/jasmine/JsApiReporter.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| {"version":3,"file":"JsApiReporter.d.ts","sourceRoot":"","sources":["../../src/jasmine/JsApiReporter.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAyBH,OAAO,EAAC,QAAQ,EAAE,UAAU,EAAC,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAC,UAAU,EAAC,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAC,WAAW,EAAC,MAAM,SAAS,CAAC;AACpC,OAAO,KAAK,MAAM,SAAS,CAAC;AAS5B,MAAM,CAAC,OAAO,OAAO,aAAc,YAAW,QAAQ;IACpD,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,UAAU,CAAC;IACvB,cAAc,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAC;IACjD,WAAW,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAC;IAC9C,MAAM,EAAE,MAAM,OAAO,CAAC;IACtB,aAAa,EAAE,MAAM,OAAO,CAAC;IAE7B,YAAY,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IAC5C,SAAS,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IACzC,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,KAAK,CAAC,WAAW,CAAC,CAAC;IACpE,MAAM,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAE1C,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,KAAK,CAAC,UAAU,CAAC,CAAC;IAClE,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;IACvC,KAAK,EAAE,MAAM,KAAK,CAAC,UAAU,CAAC,CAAC;IAC/B,WAAW,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;gBAE5B,OAAO,EAAE;QAAC,KAAK,CAAC,EAAE,KAAK,CAAA;KAAC;CA8ErC"} | ||||
							
								
								
									
										173
									
								
								node_modules/jest-jasmine2/build/jasmine/JsApiReporter.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										173
									
								
								node_modules/jest-jasmine2/build/jasmine/JsApiReporter.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,173 @@ | ||||
| 'use strict'; | ||||
|  | ||||
| Object.defineProperty(exports, '__esModule', { | ||||
|   value: true | ||||
| }); | ||||
| exports.default = void 0; | ||||
|  | ||||
| function _defineProperty(obj, key, value) { | ||||
|   if (key in obj) { | ||||
|     Object.defineProperty(obj, key, { | ||||
|       value: value, | ||||
|       enumerable: true, | ||||
|       configurable: true, | ||||
|       writable: true | ||||
|     }); | ||||
|   } else { | ||||
|     obj[key] = value; | ||||
|   } | ||||
|   return obj; | ||||
| } | ||||
|  | ||||
| /** | ||||
|  * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||||
|  * | ||||
|  * This source code is licensed under the MIT license found in the | ||||
|  * LICENSE file in the root directory of this source tree. | ||||
|  * | ||||
|  */ | ||||
| // This file is a heavily modified fork of Jasmine. Original license: | ||||
|  | ||||
| /* | ||||
| Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||||
|  | ||||
| Permission is hereby granted, free of charge, to any person obtaining | ||||
| a copy of this software and associated documentation files (the | ||||
| "Software"), to deal in the Software without restriction, including | ||||
| without limitation the rights to use, copy, modify, merge, publish, | ||||
| distribute, sublicense, and/or sell copies of the Software, and to | ||||
| permit persons to whom the Software is furnished to do so, subject to | ||||
| the following conditions: | ||||
|  | ||||
| The above copyright notice and this permission notice shall be | ||||
| included in all copies or substantial portions of the Software. | ||||
|  | ||||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||||
| EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||||
| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||||
| NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||||
| LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||||
| OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||||
| WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||||
| */ | ||||
|  | ||||
| /* eslint-disable sort-keys */ | ||||
| const noopTimer = { | ||||
|   start() {}, | ||||
|  | ||||
|   elapsed() { | ||||
|     return 0; | ||||
|   } | ||||
| }; | ||||
|  | ||||
| class JsApiReporter { | ||||
|   constructor(options) { | ||||
|     _defineProperty(this, 'started', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'finished', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'runDetails', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'jasmineStarted', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'jasmineDone', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'status', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'executionTime', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'suiteStarted', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'suiteDone', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'suiteResults', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'suites', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'specResults', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'specDone', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'specs', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'specStarted', void 0); | ||||
|  | ||||
|     const timer = options.timer || noopTimer; | ||||
|     let status = 'loaded'; | ||||
|     this.started = false; | ||||
|     this.finished = false; | ||||
|     this.runDetails = {}; | ||||
|  | ||||
|     this.jasmineStarted = () => { | ||||
|       this.started = true; | ||||
|       status = 'started'; | ||||
|       timer.start(); | ||||
|     }; | ||||
|  | ||||
|     let executionTime; | ||||
|  | ||||
|     function validateAfterAllExceptions({failedExpectations}) { | ||||
|       if (failedExpectations && failedExpectations.length > 0) { | ||||
|         throw failedExpectations[0]; | ||||
|       } | ||||
|     } | ||||
|  | ||||
|     this.jasmineDone = function(runDetails) { | ||||
|       validateAfterAllExceptions(runDetails); | ||||
|       this.finished = true; | ||||
|       this.runDetails = runDetails; | ||||
|       executionTime = timer.elapsed(); | ||||
|       status = 'done'; | ||||
|     }; | ||||
|  | ||||
|     this.status = function() { | ||||
|       return status; | ||||
|     }; | ||||
|  | ||||
|     const suites = []; | ||||
|     const suites_hash = {}; | ||||
|  | ||||
|     this.specStarted = function() {}; | ||||
|  | ||||
|     this.suiteStarted = function(result) { | ||||
|       suites_hash[result.id] = result; | ||||
|     }; | ||||
|  | ||||
|     this.suiteDone = function(result) { | ||||
|       storeSuite(result); | ||||
|     }; | ||||
|  | ||||
|     this.suiteResults = function(index, length) { | ||||
|       return suites.slice(index, index + length); | ||||
|     }; | ||||
|  | ||||
|     function storeSuite(result) { | ||||
|       suites.push(result); | ||||
|       suites_hash[result.id] = result; | ||||
|     } | ||||
|  | ||||
|     this.suites = function() { | ||||
|       return suites_hash; | ||||
|     }; | ||||
|  | ||||
|     const specs = []; | ||||
|  | ||||
|     this.specDone = function(result) { | ||||
|       specs.push(result); | ||||
|     }; | ||||
|  | ||||
|     this.specResults = function(index, length) { | ||||
|       return specs.slice(index, index + length); | ||||
|     }; | ||||
|  | ||||
|     this.specs = function() { | ||||
|       return specs; | ||||
|     }; | ||||
|  | ||||
|     this.executionTime = function() { | ||||
|       return executionTime; | ||||
|     }; | ||||
|   } | ||||
| } | ||||
|  | ||||
| exports.default = JsApiReporter; | ||||
							
								
								
									
										23
									
								
								node_modules/jest-jasmine2/build/jasmine/ReportDispatcher.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								node_modules/jest-jasmine2/build/jasmine/ReportDispatcher.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,23 @@ | ||||
| /** | ||||
|  * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||||
|  * | ||||
|  * This source code is licensed under the MIT license found in the | ||||
|  * LICENSE file in the root directory of this source tree. | ||||
|  * | ||||
|  */ | ||||
| import { Reporter, RunDetails } from '../types'; | ||||
| import { SpecResult } from './Spec'; | ||||
| import { SuiteResult } from './Suite'; | ||||
| export default class ReportDispatcher implements Reporter { | ||||
|     addReporter: (reporter: Reporter) => void; | ||||
|     provideFallbackReporter: (reporter: Reporter) => void; | ||||
|     clearReporters: () => void; | ||||
|     jasmineDone: (runDetails: RunDetails) => void; | ||||
|     jasmineStarted: (runDetails: RunDetails) => void; | ||||
|     specDone: (result: SpecResult) => void; | ||||
|     specStarted: (spec: SpecResult) => void; | ||||
|     suiteDone: (result: SuiteResult) => void; | ||||
|     suiteStarted: (result: SuiteResult) => void; | ||||
|     constructor(methods: Array<keyof Reporter>); | ||||
| } | ||||
| //# sourceMappingURL=ReportDispatcher.d.ts.map | ||||
							
								
								
									
										1
									
								
								node_modules/jest-jasmine2/build/jasmine/ReportDispatcher.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/jest-jasmine2/build/jasmine/ReportDispatcher.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| {"version":3,"file":"ReportDispatcher.d.ts","sourceRoot":"","sources":["../../src/jasmine/ReportDispatcher.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAwBH,OAAO,EAAC,QAAQ,EAAE,UAAU,EAAC,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAC,UAAU,EAAC,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAC,WAAW,EAAC,MAAM,SAAS,CAAC;AAEpC,MAAM,CAAC,OAAO,OAAO,gBAAiB,YAAW,QAAQ;IACvD,WAAW,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,IAAI,CAAC;IAC1C,uBAAuB,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,IAAI,CAAC;IACtD,cAAc,EAAE,MAAM,IAAI,CAAC;IAG3B,WAAW,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAC;IAE9C,cAAc,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAC;IAEjD,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;IAEvC,WAAW,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;IAExC,SAAS,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IAEzC,YAAY,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;gBAEhC,OAAO,EAAE,KAAK,CAAC,MAAM,QAAQ,CAAC;CA0C3C"} | ||||
							
								
								
									
										125
									
								
								node_modules/jest-jasmine2/build/jasmine/ReportDispatcher.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										125
									
								
								node_modules/jest-jasmine2/build/jasmine/ReportDispatcher.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,125 @@ | ||||
| 'use strict'; | ||||
|  | ||||
| Object.defineProperty(exports, '__esModule', { | ||||
|   value: true | ||||
| }); | ||||
| exports.default = void 0; | ||||
|  | ||||
| function _defineProperty(obj, key, value) { | ||||
|   if (key in obj) { | ||||
|     Object.defineProperty(obj, key, { | ||||
|       value: value, | ||||
|       enumerable: true, | ||||
|       configurable: true, | ||||
|       writable: true | ||||
|     }); | ||||
|   } else { | ||||
|     obj[key] = value; | ||||
|   } | ||||
|   return obj; | ||||
| } | ||||
|  | ||||
| /** | ||||
|  * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||||
|  * | ||||
|  * This source code is licensed under the MIT license found in the | ||||
|  * LICENSE file in the root directory of this source tree. | ||||
|  * | ||||
|  */ | ||||
| // This file is a heavily modified fork of Jasmine. Original license: | ||||
|  | ||||
| /* | ||||
| Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||||
|  | ||||
| Permission is hereby granted, free of charge, to any person obtaining | ||||
| a copy of this software and associated documentation files (the | ||||
| "Software"), to deal in the Software without restriction, including | ||||
| without limitation the rights to use, copy, modify, merge, publish, | ||||
| distribute, sublicense, and/or sell copies of the Software, and to | ||||
| permit persons to whom the Software is furnished to do so, subject to | ||||
| the following conditions: | ||||
|  | ||||
| The above copyright notice and this permission notice shall be | ||||
| included in all copies or substantial portions of the Software. | ||||
|  | ||||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||||
| EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||||
| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||||
| NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||||
| LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||||
| OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||||
| WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||||
| */ | ||||
| class ReportDispatcher { | ||||
|   // @ts-ignore | ||||
|   // @ts-ignore | ||||
|   // @ts-ignore | ||||
|   // @ts-ignore | ||||
|   // @ts-ignore | ||||
|   // @ts-ignore | ||||
|   constructor(methods) { | ||||
|     _defineProperty(this, 'addReporter', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'provideFallbackReporter', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'clearReporters', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'jasmineDone', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'jasmineStarted', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'specDone', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'specStarted', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'suiteDone', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'suiteStarted', void 0); | ||||
|  | ||||
|     const dispatchedMethods = methods || []; | ||||
|  | ||||
|     for (let i = 0; i < dispatchedMethods.length; i++) { | ||||
|       const method = dispatchedMethods[i]; | ||||
|  | ||||
|       this[method] = (function(m) { | ||||
|         return function() { | ||||
|           dispatch(m, arguments); | ||||
|         }; | ||||
|       })(method); | ||||
|     } | ||||
|  | ||||
|     let reporters = []; | ||||
|     let fallbackReporter = null; | ||||
|  | ||||
|     this.addReporter = function(reporter) { | ||||
|       reporters.push(reporter); | ||||
|     }; | ||||
|  | ||||
|     this.provideFallbackReporter = function(reporter) { | ||||
|       fallbackReporter = reporter; | ||||
|     }; | ||||
|  | ||||
|     this.clearReporters = function() { | ||||
|       reporters = []; | ||||
|     }; | ||||
|  | ||||
|     return this; | ||||
|  | ||||
|     function dispatch(method, args) { | ||||
|       if (reporters.length === 0 && fallbackReporter !== null) { | ||||
|         reporters.push(fallbackReporter); | ||||
|       } | ||||
|  | ||||
|       for (let i = 0; i < reporters.length; i++) { | ||||
|         const reporter = reporters[i]; | ||||
|  | ||||
|         if (reporter[method]) { | ||||
|           // @ts-ignore | ||||
|           reporter[method].apply(reporter, args); | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| } | ||||
|  | ||||
| exports.default = ReportDispatcher; | ||||
							
								
								
									
										82
									
								
								node_modules/jest-jasmine2/build/jasmine/Spec.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										82
									
								
								node_modules/jest-jasmine2/build/jasmine/Spec.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,82 @@ | ||||
| /** | ||||
|  * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||||
|  * | ||||
|  * This source code is licensed under the MIT license found in the | ||||
|  * LICENSE file in the root directory of this source tree. | ||||
|  * | ||||
|  */ | ||||
| import { Config } from '@jest/types'; | ||||
| import { FailedAssertion, Milliseconds, Status } from '@jest/test-result'; | ||||
| import ExpectationFailed from '../ExpectationFailed'; | ||||
| import expectationResultFactory, { Options as ExpectationResultFactoryOptions } from '../expectationResultFactory'; | ||||
| import queueRunner, { QueueableFn } from '../queueRunner'; | ||||
| import { AssertionErrorWithStack } from '../types'; | ||||
| export declare type Attributes = { | ||||
|     id: string; | ||||
|     resultCallback: (result: Spec['result']) => void; | ||||
|     description: string; | ||||
|     throwOnExpectationFailure: unknown; | ||||
|     getTestPath: () => Config.Path; | ||||
|     queueableFn: QueueableFn; | ||||
|     beforeAndAfterFns: () => { | ||||
|         befores: Array<QueueableFn>; | ||||
|         afters: Array<QueueableFn>; | ||||
|     }; | ||||
|     userContext: () => unknown; | ||||
|     onStart: (context: Spec) => void; | ||||
|     getSpecName: (spec: Spec) => string; | ||||
|     queueRunnerFactory: typeof queueRunner; | ||||
| }; | ||||
| export declare type SpecResult = { | ||||
|     id: string; | ||||
|     description: string; | ||||
|     fullName: string; | ||||
|     duration?: Milliseconds; | ||||
|     failedExpectations: Array<FailedAssertion>; | ||||
|     testPath: Config.Path; | ||||
|     passedExpectations: Array<ReturnType<typeof expectationResultFactory>>; | ||||
|     pendingReason: string; | ||||
|     status: Status; | ||||
|     __callsite?: { | ||||
|         getColumnNumber: () => number; | ||||
|         getLineNumber: () => number; | ||||
|     }; | ||||
| }; | ||||
| export default class Spec { | ||||
|     id: string; | ||||
|     description: string; | ||||
|     resultCallback: (result: SpecResult) => void; | ||||
|     queueableFn: QueueableFn; | ||||
|     beforeAndAfterFns: () => { | ||||
|         befores: Array<QueueableFn>; | ||||
|         afters: Array<QueueableFn>; | ||||
|     }; | ||||
|     userContext: () => unknown; | ||||
|     onStart: (spec: Spec) => void; | ||||
|     getSpecName: (spec: Spec) => string; | ||||
|     queueRunnerFactory: typeof queueRunner; | ||||
|     throwOnExpectationFailure: boolean; | ||||
|     initError: Error; | ||||
|     result: SpecResult; | ||||
|     disabled?: boolean; | ||||
|     currentRun?: ReturnType<typeof queueRunner>; | ||||
|     markedTodo?: boolean; | ||||
|     markedPending?: boolean; | ||||
|     expand?: boolean; | ||||
|     static pendingSpecExceptionMessage: string; | ||||
|     static isPendingSpecException(e: Error): boolean; | ||||
|     constructor(attrs: Attributes); | ||||
|     addExpectationResult(passed: boolean, data: ExpectationResultFactoryOptions, isError?: boolean): void; | ||||
|     execute(onComplete: Function, enabled: boolean): void; | ||||
|     cancel(): void; | ||||
|     onException(error: ExpectationFailed | AssertionErrorWithStack): void; | ||||
|     disable(): void; | ||||
|     pend(message?: string): void; | ||||
|     todo(): void; | ||||
|     getResult(): SpecResult; | ||||
|     status(enabled?: boolean): "disabled" | "pending" | "failed" | "passed" | "todo"; | ||||
|     isExecutable(): boolean; | ||||
|     getFullName(): string; | ||||
|     isAssertionError(error: Error): boolean; | ||||
| } | ||||
| //# sourceMappingURL=Spec.d.ts.map | ||||
							
								
								
									
										1
									
								
								node_modules/jest-jasmine2/build/jasmine/Spec.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/jest-jasmine2/build/jasmine/Spec.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| {"version":3,"file":"Spec.d.ts","sourceRoot":"","sources":["../../src/jasmine/Spec.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA2BH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,eAAe,EAAE,YAAY,EAAE,MAAM,EAAC,MAAM,mBAAmB,CAAC;AAExE,OAAO,iBAAiB,MAAM,sBAAsB,CAAC;AACrD,OAAO,wBAAwB,EAAE,EAC/B,OAAO,IAAI,+BAA+B,EAC3C,MAAM,6BAA6B,CAAC;AAErC,OAAO,WAAW,EAAE,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAC,uBAAuB,EAAC,MAAM,UAAU,CAAC;AAEjD,oBAAY,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,cAAc,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAC;IACjD,WAAW,EAAE,MAAM,CAAC;IACpB,yBAAyB,EAAE,OAAO,CAAC;IACnC,WAAW,EAAE,MAAM,MAAM,CAAC,IAAI,CAAC;IAC/B,WAAW,EAAE,WAAW,CAAC;IACzB,iBAAiB,EAAE,MAAM;QACvB,OAAO,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;QAC5B,MAAM,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;KAC5B,CAAC;IACF,WAAW,EAAE,MAAM,OAAO,CAAC;IAC3B,OAAO,EAAE,CAAC,OAAO,EAAE,IAAI,KAAK,IAAI,CAAC;IACjC,WAAW,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC;IACpC,kBAAkB,EAAE,OAAO,WAAW,CAAC;CACxC,CAAC;AAEF,oBAAY,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,kBAAkB,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC;IAC3C,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC;IACtB,kBAAkB,EAAE,KAAK,CAAC,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC,CAAC;IACvE,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE;QACX,eAAe,EAAE,MAAM,MAAM,CAAC;QAC9B,aAAa,EAAE,MAAM,MAAM,CAAC;KAC7B,CAAC;CACH,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,IAAI;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;IAC7C,WAAW,EAAE,WAAW,CAAC;IACzB,iBAAiB,EAAE,MAAM;QACvB,OAAO,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;QAC5B,MAAM,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;KAC5B,CAAC;IACF,WAAW,EAAE,MAAM,OAAO,CAAC;IAC3B,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAC9B,WAAW,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC;IACpC,kBAAkB,EAAE,OAAO,WAAW,CAAC;IACvC,yBAAyB,EAAE,OAAO,CAAC;IACnC,SAAS,EAAE,KAAK,CAAC;IACjB,MAAM,EAAE,UAAU,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;IAC5C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB,MAAM,CAAC,2BAA2B,EAAE,MAAM,CAAC;IAE3C,MAAM,CAAC,sBAAsB,CAAC,CAAC,EAAE,KAAK;gBAQ1B,KAAK,EAAE,UAAU;IA+C7B,oBAAoB,CAClB,MAAM,EAAE,OAAO,EACf,IAAI,EAAE,+BAA+B,EACrC,OAAO,CAAC,EAAE,OAAO;IAcnB,OAAO,CAAC,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO;IA0C9C,MAAM;IAMN,WAAW,CAAC,KAAK,EAAE,iBAAiB,GAAG,uBAAuB;IAyB9D,OAAO;IAIP,IAAI,CAAC,OAAO,CAAC,EAAE,MAAM;IAOrB,IAAI;IAIJ,SAAS;IAKT,MAAM,CAAC,OAAO,CAAC,EAAE,OAAO;IAoBxB,YAAY;IAIZ,WAAW;IAIX,gBAAgB,CAAC,KAAK,EAAE,KAAK;CAM9B"} | ||||
							
								
								
									
										298
									
								
								node_modules/jest-jasmine2/build/jasmine/Spec.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										298
									
								
								node_modules/jest-jasmine2/build/jasmine/Spec.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,298 @@ | ||||
| 'use strict'; | ||||
|  | ||||
| Object.defineProperty(exports, '__esModule', { | ||||
|   value: true | ||||
| }); | ||||
| exports.default = void 0; | ||||
|  | ||||
| var _assert = require('assert'); | ||||
|  | ||||
| var _ExpectationFailed = _interopRequireDefault( | ||||
|   require('../ExpectationFailed') | ||||
| ); | ||||
|  | ||||
| var _expectationResultFactory = _interopRequireDefault( | ||||
|   require('../expectationResultFactory') | ||||
| ); | ||||
|  | ||||
| var _assertionErrorMessage = _interopRequireDefault( | ||||
|   require('../assertionErrorMessage') | ||||
| ); | ||||
|  | ||||
| function _interopRequireDefault(obj) { | ||||
|   return obj && obj.__esModule ? obj : {default: obj}; | ||||
| } | ||||
|  | ||||
| function _defineProperty(obj, key, value) { | ||||
|   if (key in obj) { | ||||
|     Object.defineProperty(obj, key, { | ||||
|       value: value, | ||||
|       enumerable: true, | ||||
|       configurable: true, | ||||
|       writable: true | ||||
|     }); | ||||
|   } else { | ||||
|     obj[key] = value; | ||||
|   } | ||||
|   return obj; | ||||
| } | ||||
|  | ||||
| class Spec { | ||||
|   static isPendingSpecException(e) { | ||||
|     return !!( | ||||
|       e && | ||||
|       e.toString && | ||||
|       e.toString().indexOf(Spec.pendingSpecExceptionMessage) !== -1 | ||||
|     ); | ||||
|   } | ||||
|  | ||||
|   constructor(attrs) { | ||||
|     _defineProperty(this, 'id', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'description', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'resultCallback', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'queueableFn', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'beforeAndAfterFns', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'userContext', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'onStart', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'getSpecName', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'queueRunnerFactory', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'throwOnExpectationFailure', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'initError', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'result', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'disabled', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'currentRun', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'markedTodo', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'markedPending', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'expand', void 0); | ||||
|  | ||||
|     this.resultCallback = attrs.resultCallback || function() {}; | ||||
|  | ||||
|     this.id = attrs.id; | ||||
|     this.description = attrs.description || ''; | ||||
|     this.queueableFn = attrs.queueableFn; | ||||
|  | ||||
|     this.beforeAndAfterFns = | ||||
|       attrs.beforeAndAfterFns || | ||||
|       function() { | ||||
|         return { | ||||
|           befores: [], | ||||
|           afters: [] | ||||
|         }; | ||||
|       }; | ||||
|  | ||||
|     this.userContext = | ||||
|       attrs.userContext || | ||||
|       function() { | ||||
|         return {}; | ||||
|       }; | ||||
|  | ||||
|     this.onStart = attrs.onStart || function() {}; | ||||
|  | ||||
|     this.getSpecName = | ||||
|       attrs.getSpecName || | ||||
|       function() { | ||||
|         return ''; | ||||
|       }; | ||||
|  | ||||
|     this.queueRunnerFactory = attrs.queueRunnerFactory || function() {}; | ||||
|  | ||||
|     this.throwOnExpectationFailure = !!attrs.throwOnExpectationFailure; | ||||
|     this.initError = new Error(); | ||||
|     this.initError.name = ''; // Without this line v8 stores references to all closures | ||||
|     // in the stack in the Error object. This line stringifies the stack | ||||
|     // property to allow garbage-collecting objects on the stack | ||||
|     // https://crbug.com/v8/7142 | ||||
|  | ||||
|     this.initError.stack = this.initError.stack; | ||||
|     this.queueableFn.initError = this.initError; // @ts-ignore | ||||
|  | ||||
|     this.result = { | ||||
|       id: this.id, | ||||
|       description: this.description, | ||||
|       fullName: this.getFullName(), | ||||
|       failedExpectations: [], | ||||
|       passedExpectations: [], | ||||
|       pendingReason: '', | ||||
|       testPath: attrs.getTestPath() | ||||
|     }; | ||||
|   } | ||||
|  | ||||
|   addExpectationResult(passed, data, isError) { | ||||
|     const expectationResult = (0, _expectationResultFactory.default)( | ||||
|       data, | ||||
|       this.initError | ||||
|     ); | ||||
|  | ||||
|     if (passed) { | ||||
|       this.result.passedExpectations.push(expectationResult); | ||||
|     } else { | ||||
|       this.result.failedExpectations.push(expectationResult); | ||||
|  | ||||
|       if (this.throwOnExpectationFailure && !isError) { | ||||
|         throw new _ExpectationFailed.default(); | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   execute(onComplete, enabled) { | ||||
|     const self = this; | ||||
|     this.onStart(this); | ||||
|  | ||||
|     if ( | ||||
|       !this.isExecutable() || | ||||
|       this.markedPending || | ||||
|       this.markedTodo || | ||||
|       enabled === false | ||||
|     ) { | ||||
|       complete(enabled); | ||||
|       return; | ||||
|     } | ||||
|  | ||||
|     const fns = this.beforeAndAfterFns(); | ||||
|     const allFns = fns.befores.concat(this.queueableFn).concat(fns.afters); | ||||
|     this.currentRun = this.queueRunnerFactory({ | ||||
|       queueableFns: allFns, | ||||
|  | ||||
|       onException() { | ||||
|         // @ts-ignore | ||||
|         self.onException.apply(self, arguments); | ||||
|       }, | ||||
|  | ||||
|       userContext: this.userContext(), | ||||
|       setTimeout, | ||||
|       clearTimeout, | ||||
|       fail: () => {} | ||||
|     }); | ||||
|     this.currentRun.then(() => complete(true)); | ||||
|  | ||||
|     function complete(enabledAgain) { | ||||
|       self.result.status = self.status(enabledAgain); | ||||
|       self.resultCallback(self.result); | ||||
|  | ||||
|       if (onComplete) { | ||||
|         onComplete(); | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   cancel() { | ||||
|     if (this.currentRun) { | ||||
|       this.currentRun.cancel(); | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   onException(error) { | ||||
|     if (Spec.isPendingSpecException(error)) { | ||||
|       this.pend(extractCustomPendingMessage(error)); | ||||
|       return; | ||||
|     } | ||||
|  | ||||
|     if (error instanceof _ExpectationFailed.default) { | ||||
|       return; | ||||
|     } | ||||
|  | ||||
|     this.addExpectationResult( | ||||
|       false, | ||||
|       { | ||||
|         matcherName: '', | ||||
|         passed: false, | ||||
|         expected: '', | ||||
|         actual: '', | ||||
|         error: this.isAssertionError(error) | ||||
|           ? (0, _assertionErrorMessage.default)(error, { | ||||
|               expand: this.expand | ||||
|             }) | ||||
|           : error | ||||
|       }, | ||||
|       true | ||||
|     ); | ||||
|   } | ||||
|  | ||||
|   disable() { | ||||
|     this.disabled = true; | ||||
|   } | ||||
|  | ||||
|   pend(message) { | ||||
|     this.markedPending = true; | ||||
|  | ||||
|     if (message) { | ||||
|       this.result.pendingReason = message; | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   todo() { | ||||
|     this.markedTodo = true; | ||||
|   } | ||||
|  | ||||
|   getResult() { | ||||
|     this.result.status = this.status(); | ||||
|     return this.result; | ||||
|   } | ||||
|  | ||||
|   status(enabled) { | ||||
|     if (this.disabled || enabled === false) { | ||||
|       return 'disabled'; | ||||
|     } | ||||
|  | ||||
|     if (this.markedTodo) { | ||||
|       return 'todo'; | ||||
|     } | ||||
|  | ||||
|     if (this.markedPending) { | ||||
|       return 'pending'; | ||||
|     } | ||||
|  | ||||
|     if (this.result.failedExpectations.length > 0) { | ||||
|       return 'failed'; | ||||
|     } else { | ||||
|       return 'passed'; | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   isExecutable() { | ||||
|     return !this.disabled; | ||||
|   } | ||||
|  | ||||
|   getFullName() { | ||||
|     return this.getSpecName(this); | ||||
|   } | ||||
|  | ||||
|   isAssertionError(error) { | ||||
|     return ( | ||||
|       error instanceof _assert.AssertionError || | ||||
|       (error && error.name === _assert.AssertionError.name) | ||||
|     ); | ||||
|   } | ||||
| } | ||||
|  | ||||
| exports.default = Spec; | ||||
|  | ||||
| _defineProperty(Spec, 'pendingSpecExceptionMessage', void 0); | ||||
|  | ||||
| Spec.pendingSpecExceptionMessage = '=> marked Pending'; | ||||
|  | ||||
| const extractCustomPendingMessage = function extractCustomPendingMessage(e) { | ||||
|   const fullMessage = e.toString(); | ||||
|   const boilerplateStart = fullMessage.indexOf( | ||||
|     Spec.pendingSpecExceptionMessage | ||||
|   ); | ||||
|   const boilerplateEnd = | ||||
|     boilerplateStart + Spec.pendingSpecExceptionMessage.length; | ||||
|   return fullMessage.substr(boilerplateEnd); | ||||
| }; | ||||
							
								
								
									
										23
									
								
								node_modules/jest-jasmine2/build/jasmine/SpyStrategy.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								node_modules/jest-jasmine2/build/jasmine/SpyStrategy.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,23 @@ | ||||
| /** | ||||
|  * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||||
|  * | ||||
|  * This source code is licensed under the MIT license found in the | ||||
|  * LICENSE file in the root directory of this source tree. | ||||
|  * | ||||
|  */ | ||||
| export default class SpyStrategy { | ||||
|     identity: () => string; | ||||
|     exec: (...args: Array<any>) => unknown; | ||||
|     callThrough: () => unknown; | ||||
|     returnValue: (value: unknown) => unknown; | ||||
|     returnValues: () => unknown; | ||||
|     throwError: (something: string | Error) => unknown; | ||||
|     callFake: (fn: Function) => unknown; | ||||
|     stub: (fn: Function) => unknown; | ||||
|     constructor({ name, fn, getSpy, }?: { | ||||
|         name?: string; | ||||
|         fn?: Function; | ||||
|         getSpy?: () => unknown; | ||||
|     }); | ||||
| } | ||||
| //# sourceMappingURL=SpyStrategy.d.ts.map | ||||
							
								
								
									
										1
									
								
								node_modules/jest-jasmine2/build/jasmine/SpyStrategy.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/jest-jasmine2/build/jasmine/SpyStrategy.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| {"version":3,"file":"SpyStrategy.d.ts","sourceRoot":"","sources":["../../src/jasmine/SpyStrategy.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAyBH,MAAM,CAAC,OAAO,OAAO,WAAW;IAC9B,QAAQ,EAAE,MAAM,MAAM,CAAC;IACvB,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,OAAO,CAAC;IACvC,WAAW,EAAE,MAAM,OAAO,CAAC;IAC3B,WAAW,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC;IACzC,YAAY,EAAE,MAAM,OAAO,CAAC;IAC5B,UAAU,EAAE,CAAC,SAAS,EAAE,MAAM,GAAG,KAAK,KAAK,OAAO,CAAC;IACnD,QAAQ,EAAE,CAAC,EAAE,EAAE,QAAQ,KAAK,OAAO,CAAC;IACpC,IAAI,EAAE,CAAC,EAAE,EAAE,QAAQ,KAAK,OAAO,CAAC;gBAEpB,EACV,IAAgB,EAChB,EAAkB,EAClB,MAAsB,GACvB,GAAE;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,EAAE,CAAC,EAAE,QAAQ,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,OAAO,CAAA;KAAM;CAyD/D"} | ||||
							
								
								
									
										141
									
								
								node_modules/jest-jasmine2/build/jasmine/SpyStrategy.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										141
									
								
								node_modules/jest-jasmine2/build/jasmine/SpyStrategy.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,141 @@ | ||||
| 'use strict'; | ||||
|  | ||||
| Object.defineProperty(exports, '__esModule', { | ||||
|   value: true | ||||
| }); | ||||
| exports.default = void 0; | ||||
|  | ||||
| function _defineProperty(obj, key, value) { | ||||
|   if (key in obj) { | ||||
|     Object.defineProperty(obj, key, { | ||||
|       value: value, | ||||
|       enumerable: true, | ||||
|       configurable: true, | ||||
|       writable: true | ||||
|     }); | ||||
|   } else { | ||||
|     obj[key] = value; | ||||
|   } | ||||
|   return obj; | ||||
| } | ||||
|  | ||||
| /** | ||||
|  * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||||
|  * | ||||
|  * This source code is licensed under the MIT license found in the | ||||
|  * LICENSE file in the root directory of this source tree. | ||||
|  * | ||||
|  */ | ||||
| // This file is a heavily modified fork of Jasmine. Original license: | ||||
|  | ||||
| /* | ||||
| Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||||
|  | ||||
| Permission is hereby granted, free of charge, to any person obtaining | ||||
| a copy of this software and associated documentation files (the | ||||
| "Software"), to deal in the Software without restriction, including | ||||
| without limitation the rights to use, copy, modify, merge, publish, | ||||
| distribute, sublicense, and/or sell copies of the Software, and to | ||||
| permit persons to whom the Software is furnished to do so, subject to | ||||
| the following conditions: | ||||
|  | ||||
| The above copyright notice and this permission notice shall be | ||||
| included in all copies or substantial portions of the Software. | ||||
|  | ||||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||||
| EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||||
| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||||
| NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||||
| LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||||
| OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||||
| WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||||
| */ | ||||
| class SpyStrategy { | ||||
|   constructor({ | ||||
|     name = 'unknown', | ||||
|     fn = function() {}, | ||||
|     getSpy = function() {} | ||||
|   } = {}) { | ||||
|     _defineProperty(this, 'identity', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'exec', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'callThrough', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'returnValue', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'returnValues', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'throwError', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'callFake', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'stub', void 0); | ||||
|  | ||||
|     const identity = name; | ||||
|     const originalFn = fn; | ||||
|  | ||||
|     let plan = function plan() {}; | ||||
|  | ||||
|     this.identity = function() { | ||||
|       return identity; | ||||
|     }; | ||||
|  | ||||
|     this.exec = function() { | ||||
|       return plan.apply(this, arguments); | ||||
|     }; | ||||
|  | ||||
|     this.callThrough = function() { | ||||
|       plan = originalFn; | ||||
|       return getSpy(); | ||||
|     }; | ||||
|  | ||||
|     this.returnValue = function(value) { | ||||
|       plan = function plan() { | ||||
|         return value; | ||||
|       }; | ||||
|  | ||||
|       return getSpy(); | ||||
|     }; | ||||
|  | ||||
|     this.returnValues = function() { | ||||
|       const values = Array.prototype.slice.call(arguments); | ||||
|  | ||||
|       plan = function plan() { | ||||
|         return values.shift(); | ||||
|       }; | ||||
|  | ||||
|       return getSpy(); | ||||
|     }; | ||||
|  | ||||
|     this.throwError = function(something) { | ||||
|       const error = | ||||
|         something instanceof Error ? something : new Error(something); | ||||
|  | ||||
|       plan = function plan() { | ||||
|         throw error; | ||||
|       }; | ||||
|  | ||||
|       return getSpy(); | ||||
|     }; | ||||
|  | ||||
|     this.callFake = function(fn) { | ||||
|       if (typeof fn !== 'function') { | ||||
|         throw new Error( | ||||
|           'Argument passed to callFake should be a function, got ' + fn | ||||
|         ); | ||||
|       } | ||||
|  | ||||
|       plan = fn; | ||||
|       return getSpy(); | ||||
|     }; | ||||
|  | ||||
|     this.stub = function(_fn) { | ||||
|       plan = function plan() {}; | ||||
|  | ||||
|       return getSpy(); | ||||
|     }; | ||||
|   } | ||||
| } | ||||
|  | ||||
| exports.default = SpyStrategy; | ||||
							
								
								
									
										62
									
								
								node_modules/jest-jasmine2/build/jasmine/Suite.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										62
									
								
								node_modules/jest-jasmine2/build/jasmine/Suite.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,62 @@ | ||||
| /** | ||||
|  * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||||
|  * | ||||
|  * This source code is licensed under the MIT license found in the | ||||
|  * LICENSE file in the root directory of this source tree. | ||||
|  * | ||||
|  */ | ||||
| import { Config } from '@jest/types'; | ||||
| import expectationResultFactory from '../expectationResultFactory'; | ||||
| import { QueueableFn } from '../queueRunner'; | ||||
| import Spec from './Spec'; | ||||
| export declare type SuiteResult = { | ||||
|     id: string; | ||||
|     description: string; | ||||
|     fullName: string; | ||||
|     failedExpectations: Array<ReturnType<typeof expectationResultFactory>>; | ||||
|     testPath: Config.Path; | ||||
|     status?: string; | ||||
| }; | ||||
| export declare type Attributes = { | ||||
|     id: string; | ||||
|     parentSuite?: Suite; | ||||
|     description: string; | ||||
|     throwOnExpectationFailure?: boolean; | ||||
|     getTestPath: () => Config.Path; | ||||
| }; | ||||
| export default class Suite { | ||||
|     id: string; | ||||
|     parentSuite?: Suite; | ||||
|     description: string; | ||||
|     throwOnExpectationFailure: boolean; | ||||
|     beforeFns: Array<QueueableFn>; | ||||
|     afterFns: Array<QueueableFn>; | ||||
|     beforeAllFns: Array<QueueableFn>; | ||||
|     afterAllFns: Array<QueueableFn>; | ||||
|     disabled: boolean; | ||||
|     children: Array<Suite | Spec>; | ||||
|     result: SuiteResult; | ||||
|     sharedContext?: object; | ||||
|     markedPending: boolean; | ||||
|     markedTodo: boolean; | ||||
|     isFocused: boolean; | ||||
|     constructor(attrs: Attributes); | ||||
|     getFullName(): string; | ||||
|     disable(): void; | ||||
|     pend(_message?: string): void; | ||||
|     beforeEach(fn: QueueableFn): void; | ||||
|     beforeAll(fn: QueueableFn): void; | ||||
|     afterEach(fn: QueueableFn): void; | ||||
|     afterAll(fn: QueueableFn): void; | ||||
|     addChild(child: Suite | Spec): void; | ||||
|     status(): "disabled" | "pending" | "failed" | "finished"; | ||||
|     isExecutable(): boolean; | ||||
|     canBeReentered(): boolean; | ||||
|     getResult(): SuiteResult; | ||||
|     sharedUserContext(): object; | ||||
|     clonedSharedUserContext(): object; | ||||
|     onException(...args: Parameters<Spec['onException']>): void; | ||||
|     addExpectationResult(...args: Parameters<Spec['addExpectationResult']>): void; | ||||
|     execute(..._args: Array<any>): void; | ||||
| } | ||||
| //# sourceMappingURL=Suite.d.ts.map | ||||
							
								
								
									
										1
									
								
								node_modules/jest-jasmine2/build/jasmine/Suite.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/jest-jasmine2/build/jasmine/Suite.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| {"version":3,"file":"Suite.d.ts","sourceRoot":"","sources":["../../src/jasmine/Suite.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA2BH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAEnC,OAAO,wBAAwB,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAC3C,OAAO,IAAI,MAAM,QAAQ,CAAC;AAE1B,oBAAY,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,kBAAkB,EAAE,KAAK,CAAC,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC,CAAC;IACvE,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,oBAAY,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,CAAC,EAAE,KAAK,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,WAAW,EAAE,MAAM,MAAM,CAAC,IAAI,CAAC;CAChC,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,KAAK;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,CAAC,EAAE,KAAK,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,yBAAyB,EAAE,OAAO,CAAC;IACnC,SAAS,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IAC9B,QAAQ,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IAC7B,YAAY,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IACjC,WAAW,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IAChC,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC;IAC9B,MAAM,EAAE,WAAW,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,OAAO,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;gBAEP,KAAK,EAAE,UAAU;IAyB7B,WAAW;IAaX,OAAO;IAGP,IAAI,CAAC,QAAQ,CAAC,EAAE,MAAM;IAGtB,UAAU,CAAC,EAAE,EAAE,WAAW;IAG1B,SAAS,CAAC,EAAE,EAAE,WAAW;IAGzB,SAAS,CAAC,EAAE,EAAE,WAAW;IAGzB,QAAQ,CAAC,EAAE,EAAE,WAAW;IAIxB,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAI5B,MAAM;IAgBN,YAAY;IAIZ,cAAc;IAId,SAAS;IAKT,iBAAiB;IAQjB,uBAAuB;IAIvB,WAAW,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAsBpD,oBAAoB,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;IAmBtE,OAAO,CAAC,GAAG,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC;CAC7B"} | ||||
							
								
								
									
										235
									
								
								node_modules/jest-jasmine2/build/jasmine/Suite.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										235
									
								
								node_modules/jest-jasmine2/build/jasmine/Suite.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,235 @@ | ||||
| 'use strict'; | ||||
|  | ||||
| Object.defineProperty(exports, '__esModule', { | ||||
|   value: true | ||||
| }); | ||||
| exports.default = void 0; | ||||
|  | ||||
| var _jestUtil = require('jest-util'); | ||||
|  | ||||
| var _ExpectationFailed = _interopRequireDefault( | ||||
|   require('../ExpectationFailed') | ||||
| ); | ||||
|  | ||||
| var _expectationResultFactory = _interopRequireDefault( | ||||
|   require('../expectationResultFactory') | ||||
| ); | ||||
|  | ||||
| function _interopRequireDefault(obj) { | ||||
|   return obj && obj.__esModule ? obj : {default: obj}; | ||||
| } | ||||
|  | ||||
| function _defineProperty(obj, key, value) { | ||||
|   if (key in obj) { | ||||
|     Object.defineProperty(obj, key, { | ||||
|       value: value, | ||||
|       enumerable: true, | ||||
|       configurable: true, | ||||
|       writable: true | ||||
|     }); | ||||
|   } else { | ||||
|     obj[key] = value; | ||||
|   } | ||||
|   return obj; | ||||
| } | ||||
|  | ||||
| class Suite { | ||||
|   constructor(attrs) { | ||||
|     _defineProperty(this, 'id', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'parentSuite', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'description', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'throwOnExpectationFailure', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'beforeFns', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'afterFns', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'beforeAllFns', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'afterAllFns', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'disabled', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'children', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'result', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'sharedContext', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'markedPending', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'markedTodo', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'isFocused', void 0); | ||||
|  | ||||
|     this.markedPending = false; | ||||
|     this.markedTodo = false; | ||||
|     this.isFocused = false; | ||||
|     this.id = attrs.id; | ||||
|     this.parentSuite = attrs.parentSuite; | ||||
|     this.description = (0, _jestUtil.convertDescriptorToString)( | ||||
|       attrs.description | ||||
|     ); | ||||
|     this.throwOnExpectationFailure = !!attrs.throwOnExpectationFailure; | ||||
|     this.beforeFns = []; | ||||
|     this.afterFns = []; | ||||
|     this.beforeAllFns = []; | ||||
|     this.afterAllFns = []; | ||||
|     this.disabled = false; | ||||
|     this.children = []; | ||||
|     this.result = { | ||||
|       id: this.id, | ||||
|       description: this.description, | ||||
|       fullName: this.getFullName(), | ||||
|       failedExpectations: [], | ||||
|       testPath: attrs.getTestPath() | ||||
|     }; | ||||
|   } | ||||
|  | ||||
|   getFullName() { | ||||
|     const fullName = []; | ||||
|  | ||||
|     for ( | ||||
|       let parentSuite = this; | ||||
|       parentSuite; | ||||
|       parentSuite = parentSuite.parentSuite | ||||
|     ) { | ||||
|       if (parentSuite.parentSuite) { | ||||
|         fullName.unshift(parentSuite.description); | ||||
|       } | ||||
|     } | ||||
|  | ||||
|     return fullName.join(' '); | ||||
|   } | ||||
|  | ||||
|   disable() { | ||||
|     this.disabled = true; | ||||
|   } | ||||
|  | ||||
|   pend(_message) { | ||||
|     this.markedPending = true; | ||||
|   } | ||||
|  | ||||
|   beforeEach(fn) { | ||||
|     this.beforeFns.unshift(fn); | ||||
|   } | ||||
|  | ||||
|   beforeAll(fn) { | ||||
|     this.beforeAllFns.push(fn); | ||||
|   } | ||||
|  | ||||
|   afterEach(fn) { | ||||
|     this.afterFns.unshift(fn); | ||||
|   } | ||||
|  | ||||
|   afterAll(fn) { | ||||
|     this.afterAllFns.unshift(fn); | ||||
|   } | ||||
|  | ||||
|   addChild(child) { | ||||
|     this.children.push(child); | ||||
|   } | ||||
|  | ||||
|   status() { | ||||
|     if (this.disabled) { | ||||
|       return 'disabled'; | ||||
|     } | ||||
|  | ||||
|     if (this.markedPending) { | ||||
|       return 'pending'; | ||||
|     } | ||||
|  | ||||
|     if (this.result.failedExpectations.length > 0) { | ||||
|       return 'failed'; | ||||
|     } else { | ||||
|       return 'finished'; | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   isExecutable() { | ||||
|     return !this.disabled; | ||||
|   } | ||||
|  | ||||
|   canBeReentered() { | ||||
|     return this.beforeAllFns.length === 0 && this.afterAllFns.length === 0; | ||||
|   } | ||||
|  | ||||
|   getResult() { | ||||
|     this.result.status = this.status(); | ||||
|     return this.result; | ||||
|   } | ||||
|  | ||||
|   sharedUserContext() { | ||||
|     if (!this.sharedContext) { | ||||
|       this.sharedContext = {}; | ||||
|     } | ||||
|  | ||||
|     return this.sharedContext; | ||||
|   } | ||||
|  | ||||
|   clonedSharedUserContext() { | ||||
|     return this.sharedUserContext(); | ||||
|   } | ||||
|  | ||||
|   onException(...args) { | ||||
|     if (args[0] instanceof _ExpectationFailed.default) { | ||||
|       return; | ||||
|     } | ||||
|  | ||||
|     if (isAfterAll(this.children)) { | ||||
|       const data = { | ||||
|         matcherName: '', | ||||
|         passed: false, | ||||
|         expected: '', | ||||
|         actual: '', | ||||
|         error: arguments[0] | ||||
|       }; | ||||
|       this.result.failedExpectations.push( | ||||
|         (0, _expectationResultFactory.default)(data) | ||||
|       ); | ||||
|     } else { | ||||
|       for (let i = 0; i < this.children.length; i++) { | ||||
|         const child = this.children[i]; | ||||
|         child.onException.apply(child, args); | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   addExpectationResult(...args) { | ||||
|     if (isAfterAll(this.children) && isFailure(args)) { | ||||
|       const data = args[1]; | ||||
|       this.result.failedExpectations.push( | ||||
|         (0, _expectationResultFactory.default)(data) | ||||
|       ); | ||||
|  | ||||
|       if (this.throwOnExpectationFailure) { | ||||
|         throw new _ExpectationFailed.default(); | ||||
|       } | ||||
|     } else { | ||||
|       for (let i = 0; i < this.children.length; i++) { | ||||
|         const child = this.children[i]; | ||||
|  | ||||
|         try { | ||||
|           child.addExpectationResult.apply(child, args); | ||||
|         } catch (e) { | ||||
|           // keep going | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   execute(..._args) {} | ||||
| } | ||||
|  | ||||
| exports.default = Suite; | ||||
|  | ||||
| function isAfterAll(children) { | ||||
|   return children && children[0] && children[0].result.status; | ||||
| } | ||||
|  | ||||
| function isFailure(args) { | ||||
|   return !args[0]; | ||||
| } | ||||
							
								
								
									
										15
									
								
								node_modules/jest-jasmine2/build/jasmine/Timer.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								node_modules/jest-jasmine2/build/jasmine/Timer.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,15 @@ | ||||
| /** | ||||
|  * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||||
|  * | ||||
|  * This source code is licensed under the MIT license found in the | ||||
|  * LICENSE file in the root directory of this source tree. | ||||
|  * | ||||
|  */ | ||||
| export default class Timer { | ||||
|     start: () => void; | ||||
|     elapsed: () => number; | ||||
|     constructor(options?: { | ||||
|         now?: () => number; | ||||
|     }); | ||||
| } | ||||
| //# sourceMappingURL=Timer.d.ts.map | ||||
							
								
								
									
										1
									
								
								node_modules/jest-jasmine2/build/jasmine/Timer.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/jest-jasmine2/build/jasmine/Timer.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| {"version":3,"file":"Timer.d.ts","sourceRoot":"","sources":["../../src/jasmine/Timer.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA+BH,MAAM,CAAC,OAAO,OAAO,KAAK;IACxB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,OAAO,EAAE,MAAM,MAAM,CAAC;gBAEV,OAAO,CAAC,EAAE;QAAC,GAAG,CAAC,EAAE,MAAM,MAAM,CAAA;KAAC;CAc3C"} | ||||
							
								
								
									
										79
									
								
								node_modules/jest-jasmine2/build/jasmine/Timer.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										79
									
								
								node_modules/jest-jasmine2/build/jasmine/Timer.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,79 @@ | ||||
| 'use strict'; | ||||
|  | ||||
| Object.defineProperty(exports, '__esModule', { | ||||
|   value: true | ||||
| }); | ||||
| exports.default = void 0; | ||||
|  | ||||
| function _defineProperty(obj, key, value) { | ||||
|   if (key in obj) { | ||||
|     Object.defineProperty(obj, key, { | ||||
|       value: value, | ||||
|       enumerable: true, | ||||
|       configurable: true, | ||||
|       writable: true | ||||
|     }); | ||||
|   } else { | ||||
|     obj[key] = value; | ||||
|   } | ||||
|   return obj; | ||||
| } | ||||
|  | ||||
| /** | ||||
|  * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||||
|  * | ||||
|  * This source code is licensed under the MIT license found in the | ||||
|  * LICENSE file in the root directory of this source tree. | ||||
|  * | ||||
|  */ | ||||
| // This file is a heavily modified fork of Jasmine. Original license: | ||||
|  | ||||
| /* | ||||
| Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||||
|  | ||||
| Permission is hereby granted, free of charge, to any person obtaining | ||||
| a copy of this software and associated documentation files (the | ||||
| "Software"), to deal in the Software without restriction, including | ||||
| without limitation the rights to use, copy, modify, merge, publish, | ||||
| distribute, sublicense, and/or sell copies of the Software, and to | ||||
| permit persons to whom the Software is furnished to do so, subject to | ||||
| the following conditions: | ||||
|  | ||||
| The above copyright notice and this permission notice shall be | ||||
| included in all copies or substantial portions of the Software. | ||||
|  | ||||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||||
| EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||||
| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||||
| NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||||
| LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||||
| OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||||
| WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||||
| */ | ||||
| const defaultNow = (function(Date) { | ||||
|   return function() { | ||||
|     return new Date().getTime(); | ||||
|   }; | ||||
| })(Date); | ||||
|  | ||||
| class Timer { | ||||
|   constructor(options) { | ||||
|     _defineProperty(this, 'start', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'elapsed', void 0); | ||||
|  | ||||
|     options = options || {}; | ||||
|     const now = options.now || defaultNow; | ||||
|     let startTime; | ||||
|  | ||||
|     this.start = function() { | ||||
|       startTime = now(); | ||||
|     }; | ||||
|  | ||||
|     this.elapsed = function() { | ||||
|       return now() - startTime; | ||||
|     }; | ||||
|   } | ||||
| } | ||||
|  | ||||
| exports.default = Timer; | ||||
							
								
								
									
										14
									
								
								node_modules/jest-jasmine2/build/jasmine/createSpy.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								node_modules/jest-jasmine2/build/jasmine/createSpy.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,14 @@ | ||||
| /** | ||||
|  * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||||
|  * | ||||
|  * This source code is licensed under the MIT license found in the | ||||
|  * LICENSE file in the root directory of this source tree. | ||||
|  * | ||||
|  */ | ||||
| import { Spy } from '../types'; | ||||
| interface Fn extends Record<string, any> { | ||||
|     (): any; | ||||
| } | ||||
| declare function createSpy(name: string, originalFn: Fn): Spy; | ||||
| export default createSpy; | ||||
| //# sourceMappingURL=createSpy.d.ts.map | ||||
							
								
								
									
										1
									
								
								node_modules/jest-jasmine2/build/jasmine/createSpy.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/jest-jasmine2/build/jasmine/createSpy.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| {"version":3,"file":"createSpy.d.ts","sourceRoot":"","sources":["../../src/jasmine/createSpy.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA0BH,OAAO,EAAC,GAAG,EAAC,MAAM,UAAU,CAAC;AAI7B,UAAU,EAAG,SAAQ,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IACtC,IAAI,GAAG,CAAC;CACT;AAED,iBAAS,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,GAAG,GAAG,CAqCpD;AAED,eAAe,SAAS,CAAC"} | ||||
							
								
								
									
										88
									
								
								node_modules/jest-jasmine2/build/jasmine/createSpy.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										88
									
								
								node_modules/jest-jasmine2/build/jasmine/createSpy.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,88 @@ | ||||
| 'use strict'; | ||||
|  | ||||
| Object.defineProperty(exports, '__esModule', { | ||||
|   value: true | ||||
| }); | ||||
| exports.default = void 0; | ||||
|  | ||||
| var _CallTracker = _interopRequireDefault(require('./CallTracker')); | ||||
|  | ||||
| var _SpyStrategy = _interopRequireDefault(require('./SpyStrategy')); | ||||
|  | ||||
| function _interopRequireDefault(obj) { | ||||
|   return obj && obj.__esModule ? obj : {default: obj}; | ||||
| } | ||||
|  | ||||
| /** | ||||
|  * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||||
|  * | ||||
|  * This source code is licensed under the MIT license found in the | ||||
|  * LICENSE file in the root directory of this source tree. | ||||
|  * | ||||
|  */ | ||||
| // This file is a heavily modified fork of Jasmine. Original license: | ||||
|  | ||||
| /* | ||||
| Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||||
|  | ||||
| Permission is hereby granted, free of charge, to any person obtaining | ||||
| a copy of this software and associated documentation files (the | ||||
| "Software"), to deal in the Software without restriction, including | ||||
| without limitation the rights to use, copy, modify, merge, publish, | ||||
| distribute, sublicense, and/or sell copies of the Software, and to | ||||
| permit persons to whom the Software is furnished to do so, subject to | ||||
| the following conditions: | ||||
|  | ||||
| The above copyright notice and this permission notice shall be | ||||
| included in all copies or substantial portions of the Software. | ||||
|  | ||||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||||
| EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||||
| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||||
| NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||||
| LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||||
| OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||||
| WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||||
| */ | ||||
|  | ||||
| /* eslint-disable sort-keys */ | ||||
| function createSpy(name, originalFn) { | ||||
|   const spyStrategy = new _SpyStrategy.default({ | ||||
|     name, | ||||
|     fn: originalFn, | ||||
|  | ||||
|     getSpy() { | ||||
|       return spy; | ||||
|     } | ||||
|   }); | ||||
|   const callTracker = new _CallTracker.default(); | ||||
|  | ||||
|   const spy = function spy(...args) { | ||||
|     const callData = { | ||||
|       object: this, | ||||
|       args: Array.prototype.slice.apply(arguments) | ||||
|     }; | ||||
|     callTracker.track(callData); | ||||
|     const returnValue = spyStrategy.exec.apply(this, args); | ||||
|     callData.returnValue = returnValue; | ||||
|     return returnValue; | ||||
|   }; | ||||
|  | ||||
|   for (const prop in originalFn) { | ||||
|     if (prop === 'and' || prop === 'calls') { | ||||
|       throw new Error( | ||||
|         "Jasmine spies would overwrite the 'and' and 'calls' properties " + | ||||
|           'on the object being spied upon' | ||||
|       ); | ||||
|     } | ||||
|  | ||||
|     spy[prop] = originalFn[prop]; | ||||
|   } | ||||
|  | ||||
|   spy.and = spyStrategy; | ||||
|   spy.calls = callTracker; | ||||
|   return spy; | ||||
| } | ||||
|  | ||||
| var _default = createSpy; | ||||
| exports.default = _default; | ||||
							
								
								
									
										31
									
								
								node_modules/jest-jasmine2/build/jasmine/jasmineLight.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								node_modules/jest-jasmine2/build/jasmine/jasmineLight.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,31 @@ | ||||
| /** | ||||
|  * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||||
|  * | ||||
|  * This source code is licensed under the MIT license found in the | ||||
|  * LICENSE file in the root directory of this source tree. | ||||
|  * | ||||
|  */ | ||||
| import { Jasmine } from '../types'; | ||||
| import JsApiReporter from './JsApiReporter'; | ||||
| declare const _default: { | ||||
|     create: (createOptions: Record<string, any>) => Jasmine; | ||||
|     interface: (jasmine: Jasmine, env: any) => { | ||||
|         describe(description: string, specDefinitions: Function): any; | ||||
|         xdescribe(description: string, specDefinitions: Function): any; | ||||
|         fdescribe(description: string, specDefinitions: Function): any; | ||||
|         it(): any; | ||||
|         xit(): any; | ||||
|         fit(): any; | ||||
|         beforeEach(): any; | ||||
|         afterEach(): any; | ||||
|         beforeAll(): any; | ||||
|         afterAll(): any; | ||||
|         pending(): any; | ||||
|         fail(): any; | ||||
|         spyOn(obj: Record<string, any>, methodName: string, accessType?: string | undefined): any; | ||||
|         jsApiReporter: JsApiReporter; | ||||
|         jasmine: Jasmine; | ||||
|     }; | ||||
| }; | ||||
| export = _default; | ||||
| //# sourceMappingURL=jasmineLight.d.ts.map | ||||
							
								
								
									
										1
									
								
								node_modules/jest-jasmine2/build/jasmine/jasmineLight.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/jest-jasmine2/build/jasmine/jasmineLight.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| {"version":3,"file":"jasmineLight.d.ts","sourceRoot":"","sources":["../../src/jasmine/jasmineLight.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA0BH,OAAO,EAAC,OAAO,EAAC,MAAM,UAAU,CAAC;AAGjC,OAAO,aAAa,MAAM,iBAAiB,CAAC;;;;;;;;;;;;;;;;;;;;;AAmH5C,kBAAyC"} | ||||
							
								
								
									
										167
									
								
								node_modules/jest-jasmine2/build/jasmine/jasmineLight.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										167
									
								
								node_modules/jest-jasmine2/build/jasmine/jasmineLight.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,167 @@ | ||||
| 'use strict'; | ||||
|  | ||||
| var _createSpy = _interopRequireDefault(require('./createSpy')); | ||||
|  | ||||
| var _Env = _interopRequireDefault(require('./Env')); | ||||
|  | ||||
| var _JsApiReporter = _interopRequireDefault(require('./JsApiReporter')); | ||||
|  | ||||
| var _ReportDispatcher = _interopRequireDefault(require('./ReportDispatcher')); | ||||
|  | ||||
| var _Spec = _interopRequireDefault(require('./Spec')); | ||||
|  | ||||
| var _spyRegistry = _interopRequireDefault(require('./spyRegistry')); | ||||
|  | ||||
| var _Suite = _interopRequireDefault(require('./Suite')); | ||||
|  | ||||
| var _Timer = _interopRequireDefault(require('./Timer')); | ||||
|  | ||||
| function _interopRequireDefault(obj) { | ||||
|   return obj && obj.__esModule ? obj : {default: obj}; | ||||
| } | ||||
|  | ||||
| function _objectSpread(target) { | ||||
|   for (var i = 1; i < arguments.length; i++) { | ||||
|     var source = arguments[i] != null ? arguments[i] : {}; | ||||
|     var ownKeys = Object.keys(source); | ||||
|     if (typeof Object.getOwnPropertySymbols === 'function') { | ||||
|       ownKeys = ownKeys.concat( | ||||
|         Object.getOwnPropertySymbols(source).filter(function(sym) { | ||||
|           return Object.getOwnPropertyDescriptor(source, sym).enumerable; | ||||
|         }) | ||||
|       ); | ||||
|     } | ||||
|     ownKeys.forEach(function(key) { | ||||
|       _defineProperty(target, key, source[key]); | ||||
|     }); | ||||
|   } | ||||
|   return target; | ||||
| } | ||||
|  | ||||
| function _defineProperty(obj, key, value) { | ||||
|   if (key in obj) { | ||||
|     Object.defineProperty(obj, key, { | ||||
|       value: value, | ||||
|       enumerable: true, | ||||
|       configurable: true, | ||||
|       writable: true | ||||
|     }); | ||||
|   } else { | ||||
|     obj[key] = value; | ||||
|   } | ||||
|   return obj; | ||||
| } | ||||
|  | ||||
| const create = function create(createOptions) { | ||||
|   const j$ = _objectSpread({}, createOptions); | ||||
|  | ||||
|   j$._DEFAULT_TIMEOUT_INTERVAL = createOptions.testTimeout || 5000; | ||||
|  | ||||
|   j$.getEnv = function(options) { | ||||
|     const env = (j$.currentEnv_ = j$.currentEnv_ || new j$.Env(options)); //jasmine. singletons in here (setTimeout blah blah). | ||||
|  | ||||
|     return env; | ||||
|   }; | ||||
|  | ||||
|   j$.createSpy = _createSpy.default; | ||||
|   j$.Env = (0, _Env.default)(j$); | ||||
|   j$.JsApiReporter = _JsApiReporter.default; | ||||
|   j$.ReportDispatcher = _ReportDispatcher.default; | ||||
|   j$.Spec = _Spec.default; | ||||
|   j$.SpyRegistry = _spyRegistry.default; | ||||
|   j$.Suite = _Suite.default; | ||||
|   j$.Timer = _Timer.default; | ||||
|   j$.version = '2.5.2-light'; | ||||
|   return j$; | ||||
| }; | ||||
|  | ||||
| const _interface = function _interface(jasmine, env) { | ||||
|   const jasmineInterface = { | ||||
|     describe(description, specDefinitions) { | ||||
|       return env.describe(description, specDefinitions); | ||||
|     }, | ||||
|  | ||||
|     xdescribe(description, specDefinitions) { | ||||
|       return env.xdescribe(description, specDefinitions); | ||||
|     }, | ||||
|  | ||||
|     fdescribe(description, specDefinitions) { | ||||
|       return env.fdescribe(description, specDefinitions); | ||||
|     }, | ||||
|  | ||||
|     it() { | ||||
|       return env.it.apply(env, arguments); | ||||
|     }, | ||||
|  | ||||
|     xit() { | ||||
|       return env.xit.apply(env, arguments); | ||||
|     }, | ||||
|  | ||||
|     fit() { | ||||
|       return env.fit.apply(env, arguments); | ||||
|     }, | ||||
|  | ||||
|     beforeEach() { | ||||
|       if (typeof arguments[0] !== 'function') { | ||||
|         throw new Error( | ||||
|           'Invalid first argument. It must be a callback function.' | ||||
|         ); | ||||
|       } | ||||
|  | ||||
|       return env.beforeEach.apply(env, arguments); | ||||
|     }, | ||||
|  | ||||
|     afterEach() { | ||||
|       if (typeof arguments[0] !== 'function') { | ||||
|         throw new Error( | ||||
|           'Invalid first argument. It must be a callback function.' | ||||
|         ); | ||||
|       } | ||||
|  | ||||
|       return env.afterEach.apply(env, arguments); | ||||
|     }, | ||||
|  | ||||
|     beforeAll() { | ||||
|       if (typeof arguments[0] !== 'function') { | ||||
|         throw new Error( | ||||
|           'Invalid first argument. It must be a callback function.' | ||||
|         ); | ||||
|       } | ||||
|  | ||||
|       return env.beforeAll.apply(env, arguments); | ||||
|     }, | ||||
|  | ||||
|     afterAll() { | ||||
|       if (typeof arguments[0] !== 'function') { | ||||
|         throw new Error( | ||||
|           'Invalid first argument. It must be a callback function.' | ||||
|         ); | ||||
|       } | ||||
|  | ||||
|       return env.afterAll.apply(env, arguments); | ||||
|     }, | ||||
|  | ||||
|     pending() { | ||||
|       return env.pending.apply(env, arguments); | ||||
|     }, | ||||
|  | ||||
|     fail() { | ||||
|       return env.fail.apply(env, arguments); | ||||
|     }, | ||||
|  | ||||
|     spyOn(obj, methodName, accessType) { | ||||
|       return env.spyOn(obj, methodName, accessType); | ||||
|     }, | ||||
|  | ||||
|     jsApiReporter: new jasmine.JsApiReporter({ | ||||
|       timer: new jasmine.Timer() | ||||
|     }), | ||||
|     jasmine | ||||
|   }; | ||||
|   return jasmineInterface; | ||||
| }; // Interface is a reserved word in strict mode, so can't export it as ESM | ||||
|  | ||||
| module.exports = { | ||||
|   create, | ||||
|   interface: _interface | ||||
| }; | ||||
							
								
								
									
										19
									
								
								node_modules/jest-jasmine2/build/jasmine/spyRegistry.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								node_modules/jest-jasmine2/build/jasmine/spyRegistry.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,19 @@ | ||||
| /** | ||||
|  * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||||
|  * | ||||
|  * This source code is licensed under the MIT license found in the | ||||
|  * LICENSE file in the root directory of this source tree. | ||||
|  * | ||||
|  */ | ||||
| import { Spy } from '../types'; | ||||
| export default class SpyRegistry { | ||||
|     allowRespy: (allow: unknown) => void; | ||||
|     spyOn: (obj: Record<string, any>, methodName: string, accessType?: keyof PropertyDescriptor) => Spy; | ||||
|     clearSpies: () => void; | ||||
|     respy: unknown; | ||||
|     private _spyOnProperty; | ||||
|     constructor({ currentSpies, }?: { | ||||
|         currentSpies?: () => Array<Spy>; | ||||
|     }); | ||||
| } | ||||
| //# sourceMappingURL=spyRegistry.d.ts.map | ||||
							
								
								
									
										1
									
								
								node_modules/jest-jasmine2/build/jasmine/spyRegistry.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/jest-jasmine2/build/jasmine/spyRegistry.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| {"version":3,"file":"spyRegistry.d.ts","sourceRoot":"","sources":["../../src/jasmine/spyRegistry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAyBH,OAAO,EAAC,GAAG,EAAC,MAAM,UAAU,CAAC;AAsB7B,MAAM,CAAC,OAAO,OAAO,WAAW;IAC9B,UAAU,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACrC,KAAK,EAAE,CACL,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACxB,UAAU,EAAE,MAAM,EAClB,UAAU,CAAC,EAAE,MAAM,kBAAkB,KAClC,GAAG,CAAC;IACT,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,KAAK,EAAE,OAAO,CAAC;IAEf,OAAO,CAAC,cAAc,CAIb;gBAEG,EACV,YAAuB,GACxB,GAAE;QACD,YAAY,CAAC,EAAE,MAAM,KAAK,CAAC,GAAG,CAAC,CAAC;KAC5B;CAgKP"} | ||||
							
								
								
									
										244
									
								
								node_modules/jest-jasmine2/build/jasmine/spyRegistry.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										244
									
								
								node_modules/jest-jasmine2/build/jasmine/spyRegistry.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,244 @@ | ||||
| 'use strict'; | ||||
|  | ||||
| Object.defineProperty(exports, '__esModule', { | ||||
|   value: true | ||||
| }); | ||||
| exports.default = void 0; | ||||
|  | ||||
| var _CallTracker = _interopRequireDefault(require('./CallTracker')); | ||||
|  | ||||
| var _createSpy = _interopRequireDefault(require('./createSpy')); | ||||
|  | ||||
| var _SpyStrategy = _interopRequireDefault(require('./SpyStrategy')); | ||||
|  | ||||
| function _interopRequireDefault(obj) { | ||||
|   return obj && obj.__esModule ? obj : {default: obj}; | ||||
| } | ||||
|  | ||||
| function _objectSpread(target) { | ||||
|   for (var i = 1; i < arguments.length; i++) { | ||||
|     var source = arguments[i] != null ? arguments[i] : {}; | ||||
|     var ownKeys = Object.keys(source); | ||||
|     if (typeof Object.getOwnPropertySymbols === 'function') { | ||||
|       ownKeys = ownKeys.concat( | ||||
|         Object.getOwnPropertySymbols(source).filter(function(sym) { | ||||
|           return Object.getOwnPropertyDescriptor(source, sym).enumerable; | ||||
|         }) | ||||
|       ); | ||||
|     } | ||||
|     ownKeys.forEach(function(key) { | ||||
|       _defineProperty(target, key, source[key]); | ||||
|     }); | ||||
|   } | ||||
|   return target; | ||||
| } | ||||
|  | ||||
| function _defineProperty(obj, key, value) { | ||||
|   if (key in obj) { | ||||
|     Object.defineProperty(obj, key, { | ||||
|       value: value, | ||||
|       enumerable: true, | ||||
|       configurable: true, | ||||
|       writable: true | ||||
|     }); | ||||
|   } else { | ||||
|     obj[key] = value; | ||||
|   } | ||||
|   return obj; | ||||
| } | ||||
|  | ||||
| const formatErrorMsg = (domain, usage) => { | ||||
|   const usageDefinition = usage ? '\nUsage: ' + usage : ''; | ||||
|   return msg => domain + ' : ' + msg + usageDefinition; | ||||
| }; | ||||
|  | ||||
| function isSpy(putativeSpy) { | ||||
|   if (!putativeSpy) { | ||||
|     return false; | ||||
|   } | ||||
|  | ||||
|   return ( | ||||
|     putativeSpy.and instanceof _SpyStrategy.default && | ||||
|     putativeSpy.calls instanceof _CallTracker.default | ||||
|   ); | ||||
| } | ||||
|  | ||||
| const getErrorMsg = formatErrorMsg('<spyOn>', 'spyOn(<object>, <methodName>)'); | ||||
|  | ||||
| class SpyRegistry { | ||||
|   constructor({currentSpies = () => []} = {}) { | ||||
|     _defineProperty(this, 'allowRespy', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'spyOn', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'clearSpies', void 0); | ||||
|  | ||||
|     _defineProperty(this, 'respy', void 0); | ||||
|  | ||||
|     _defineProperty(this, '_spyOnProperty', void 0); | ||||
|  | ||||
|     this.allowRespy = function(allow) { | ||||
|       this.respy = allow; | ||||
|     }; | ||||
|  | ||||
|     this.spyOn = (obj, methodName, accessType) => { | ||||
|       if (accessType) { | ||||
|         return this._spyOnProperty(obj, methodName, accessType); | ||||
|       } | ||||
|  | ||||
|       if (obj === void 0) { | ||||
|         throw new Error( | ||||
|           getErrorMsg( | ||||
|             'could not find an object to spy upon for ' + methodName + '()' | ||||
|           ) | ||||
|         ); | ||||
|       } | ||||
|  | ||||
|       if (methodName === void 0) { | ||||
|         throw new Error(getErrorMsg('No method name supplied')); | ||||
|       } | ||||
|  | ||||
|       if (obj[methodName] === void 0) { | ||||
|         throw new Error(getErrorMsg(methodName + '() method does not exist')); | ||||
|       } | ||||
|  | ||||
|       if (obj[methodName] && isSpy(obj[methodName])) { | ||||
|         if (this.respy) { | ||||
|           return obj[methodName]; | ||||
|         } else { | ||||
|           throw new Error( | ||||
|             getErrorMsg(methodName + ' has already been spied upon') | ||||
|           ); | ||||
|         } | ||||
|       } | ||||
|  | ||||
|       let descriptor; | ||||
|  | ||||
|       try { | ||||
|         descriptor = Object.getOwnPropertyDescriptor(obj, methodName); | ||||
|       } catch (e) { | ||||
|         // IE 8 doesn't support `definePropery` on non-DOM nodes | ||||
|       } | ||||
|  | ||||
|       if (descriptor && !(descriptor.writable || descriptor.set)) { | ||||
|         throw new Error( | ||||
|           getErrorMsg(methodName + ' is not declared writable or has no setter') | ||||
|         ); | ||||
|       } | ||||
|  | ||||
|       const originalMethod = obj[methodName]; | ||||
|       const spiedMethod = (0, _createSpy.default)(methodName, originalMethod); | ||||
|       let restoreStrategy; | ||||
|  | ||||
|       if (Object.prototype.hasOwnProperty.call(obj, methodName)) { | ||||
|         restoreStrategy = function restoreStrategy() { | ||||
|           obj[methodName] = originalMethod; | ||||
|         }; | ||||
|       } else { | ||||
|         restoreStrategy = function restoreStrategy() { | ||||
|           if (!delete obj[methodName]) { | ||||
|             obj[methodName] = originalMethod; | ||||
|           } | ||||
|         }; | ||||
|       } | ||||
|  | ||||
|       currentSpies().push({ | ||||
|         restoreObjectToOriginalState: restoreStrategy | ||||
|       }); | ||||
|       obj[methodName] = spiedMethod; | ||||
|       return spiedMethod; | ||||
|     }; | ||||
|  | ||||
|     this._spyOnProperty = function(obj, propertyName, accessType = 'get') { | ||||
|       if (!obj) { | ||||
|         throw new Error( | ||||
|           getErrorMsg( | ||||
|             'could not find an object to spy upon for ' + propertyName | ||||
|           ) | ||||
|         ); | ||||
|       } | ||||
|  | ||||
|       if (!propertyName) { | ||||
|         throw new Error(getErrorMsg('No property name supplied')); | ||||
|       } | ||||
|  | ||||
|       let descriptor; | ||||
|  | ||||
|       try { | ||||
|         descriptor = Object.getOwnPropertyDescriptor(obj, propertyName); | ||||
|       } catch (e) { | ||||
|         // IE 8 doesn't support `definePropery` on non-DOM nodes | ||||
|       } | ||||
|  | ||||
|       if (!descriptor) { | ||||
|         throw new Error(getErrorMsg(propertyName + ' property does not exist')); | ||||
|       } | ||||
|  | ||||
|       if (!descriptor.configurable) { | ||||
|         throw new Error( | ||||
|           getErrorMsg(propertyName + ' is not declared configurable') | ||||
|         ); | ||||
|       } | ||||
|  | ||||
|       if (!descriptor[accessType]) { | ||||
|         throw new Error( | ||||
|           getErrorMsg( | ||||
|             'Property ' + | ||||
|               propertyName + | ||||
|               ' does not have access type ' + | ||||
|               accessType | ||||
|           ) | ||||
|         ); | ||||
|       } | ||||
|  | ||||
|       if (obj[propertyName] && isSpy(obj[propertyName])) { | ||||
|         if (this.respy) { | ||||
|           return obj[propertyName]; | ||||
|         } else { | ||||
|           throw new Error( | ||||
|             getErrorMsg(propertyName + ' has already been spied upon') | ||||
|           ); | ||||
|         } | ||||
|       } | ||||
|  | ||||
|       const originalDescriptor = descriptor; | ||||
|       const spiedProperty = (0, _createSpy.default)( | ||||
|         propertyName, | ||||
|         descriptor[accessType] | ||||
|       ); | ||||
|       let restoreStrategy; | ||||
|  | ||||
|       if (Object.prototype.hasOwnProperty.call(obj, propertyName)) { | ||||
|         restoreStrategy = function restoreStrategy() { | ||||
|           Object.defineProperty(obj, propertyName, originalDescriptor); | ||||
|         }; | ||||
|       } else { | ||||
|         restoreStrategy = function restoreStrategy() { | ||||
|           delete obj[propertyName]; | ||||
|         }; | ||||
|       } | ||||
|  | ||||
|       currentSpies().push({ | ||||
|         restoreObjectToOriginalState: restoreStrategy | ||||
|       }); | ||||
|  | ||||
|       const spiedDescriptor = _objectSpread({}, descriptor, { | ||||
|         [accessType]: spiedProperty | ||||
|       }); | ||||
|  | ||||
|       Object.defineProperty(obj, propertyName, spiedDescriptor); | ||||
|       return spiedProperty; | ||||
|     }; | ||||
|  | ||||
|     this.clearSpies = function() { | ||||
|       const spies = currentSpies(); | ||||
|  | ||||
|       for (let i = spies.length - 1; i >= 0; i--) { | ||||
|         const spyEntry = spies[i]; | ||||
|         spyEntry.restoreObjectToOriginalState(); | ||||
|       } | ||||
|     }; | ||||
|   } | ||||
| } | ||||
|  | ||||
| exports.default = SpyRegistry; | ||||
							
								
								
									
										13
									
								
								node_modules/jest-jasmine2/build/jasmineAsyncInstall.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								node_modules/jest-jasmine2/build/jasmineAsyncInstall.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,13 @@ | ||||
| /** | ||||
|  * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||||
|  * | ||||
|  * This source code is licensed under the MIT license found in the | ||||
|  * LICENSE file in the root directory of this source tree. | ||||
|  */ | ||||
| /** | ||||
|  * This module adds ability to test async promise code with jasmine by | ||||
|  * returning a promise from `it/test` and `before/afterEach/All` blocks. | ||||
|  */ | ||||
| import { Global, Config } from '@jest/types'; | ||||
| export default function jasmineAsyncInstall(globalConfig: Config.GlobalConfig, global: Global.Global): void; | ||||
| //# sourceMappingURL=jasmineAsyncInstall.d.ts.map | ||||
							
								
								
									
										1
									
								
								node_modules/jest-jasmine2/build/jasmineAsyncInstall.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/jest-jasmine2/build/jasmineAsyncInstall.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| {"version":3,"file":"jasmineAsyncInstall.d.ts","sourceRoot":"","sources":["../src/jasmineAsyncInstall.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;GAGG;AAEH,OAAO,EAAC,MAAM,EAAE,MAAM,EAAC,MAAM,aAAa,CAAC;AAkK3C,MAAM,CAAC,OAAO,UAAU,mBAAmB,CACzC,YAAY,EAAE,MAAM,CAAC,YAAY,EACjC,MAAM,EAAE,MAAM,CAAC,MAAM,QAuBtB"} | ||||
							
								
								
									
										188
									
								
								node_modules/jest-jasmine2/build/jasmineAsyncInstall.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										188
									
								
								node_modules/jest-jasmine2/build/jasmineAsyncInstall.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,188 @@ | ||||
| 'use strict'; | ||||
|  | ||||
| Object.defineProperty(exports, '__esModule', { | ||||
|   value: true | ||||
| }); | ||||
| exports.default = jasmineAsyncInstall; | ||||
|  | ||||
| var _co = _interopRequireDefault(require('co')); | ||||
|  | ||||
| var _isGeneratorFn = _interopRequireDefault(require('is-generator-fn')); | ||||
|  | ||||
| var _throat = _interopRequireDefault(require('throat')); | ||||
|  | ||||
| var _isError3 = _interopRequireDefault(require('./isError')); | ||||
|  | ||||
| function _interopRequireDefault(obj) { | ||||
|   return obj && obj.__esModule ? obj : {default: obj}; | ||||
| } | ||||
|  | ||||
| var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; | ||||
| var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; | ||||
| var Promise = global[Symbol.for('jest-native-promise')] || global.Promise; | ||||
|  | ||||
| function isPromise(obj) { | ||||
|   return obj && typeof obj.then === 'function'; | ||||
| } | ||||
|  | ||||
| function promisifyLifeCycleFunction(originalFn, env) { | ||||
|   return function(fn, timeout) { | ||||
|     if (!fn) { | ||||
|       return originalFn.call(env); | ||||
|     } | ||||
|  | ||||
|     const hasDoneCallback = typeof fn === 'function' && fn.length > 0; | ||||
|  | ||||
|     if (hasDoneCallback) { | ||||
|       // Jasmine will handle it | ||||
|       return originalFn.call(env, fn, timeout); | ||||
|     } | ||||
|  | ||||
|     const extraError = new Error(); // Without this line v8 stores references to all closures | ||||
|     // in the stack in the Error object. This line stringifies the stack | ||||
|     // property to allow garbage-collecting objects on the stack | ||||
|     // https://crbug.com/v8/7142 | ||||
|  | ||||
|     extraError.stack = extraError.stack; // We make *all* functions async and run `done` right away if they | ||||
|     // didn't return a promise. | ||||
|  | ||||
|     const asyncJestLifecycle = function asyncJestLifecycle(done) { | ||||
|       const wrappedFn = (0, _isGeneratorFn.default)(fn) | ||||
|         ? _co.default.wrap(fn) | ||||
|         : fn; | ||||
|       const returnValue = wrappedFn.call({}); | ||||
|  | ||||
|       if (isPromise(returnValue)) { | ||||
|         returnValue.then(done.bind(null, null), error => { | ||||
|           const _isError = (0, _isError3.default)(error), | ||||
|             checkIsError = _isError.isError, | ||||
|             message = _isError.message; | ||||
|  | ||||
|           if (message) { | ||||
|             extraError.message = message; | ||||
|           } | ||||
|  | ||||
|           done.fail(checkIsError ? error : extraError); | ||||
|         }); | ||||
|       } else { | ||||
|         done(); | ||||
|       } | ||||
|     }; | ||||
|  | ||||
|     return originalFn.call(env, asyncJestLifecycle, timeout); | ||||
|   }; | ||||
| } // Similar to promisifyLifeCycleFunction but throws an error | ||||
| // when the return value is neither a Promise nor `undefined` | ||||
|  | ||||
| function promisifyIt(originalFn, env, jasmine) { | ||||
|   return function(specName, fn, timeout) { | ||||
|     if (!fn) { | ||||
|       const spec = originalFn.call(env, specName); | ||||
|       spec.pend('not implemented'); | ||||
|       return spec; | ||||
|     } | ||||
|  | ||||
|     const hasDoneCallback = fn.length > 0; | ||||
|  | ||||
|     if (hasDoneCallback) { | ||||
|       return originalFn.call(env, specName, fn, timeout); | ||||
|     } | ||||
|  | ||||
|     const extraError = new Error(); // Without this line v8 stores references to all closures | ||||
|     // in the stack in the Error object. This line stringifies the stack | ||||
|     // property to allow garbage-collecting objects on the stack | ||||
|     // https://crbug.com/v8/7142 | ||||
|  | ||||
|     extraError.stack = extraError.stack; | ||||
|  | ||||
|     const asyncJestTest = function asyncJestTest(done) { | ||||
|       const wrappedFn = (0, _isGeneratorFn.default)(fn) | ||||
|         ? _co.default.wrap(fn) | ||||
|         : fn; | ||||
|       const returnValue = wrappedFn.call({}); | ||||
|  | ||||
|       if (isPromise(returnValue)) { | ||||
|         returnValue.then(done.bind(null, null), error => { | ||||
|           const _isError2 = (0, _isError3.default)(error), | ||||
|             checkIsError = _isError2.isError, | ||||
|             message = _isError2.message; | ||||
|  | ||||
|           if (message) { | ||||
|             extraError.message = message; | ||||
|           } | ||||
|  | ||||
|           if (jasmine.Spec.isPendingSpecException(error)) { | ||||
|             env.pending(message); | ||||
|             done(); | ||||
|           } else { | ||||
|             done.fail(checkIsError ? error : extraError); | ||||
|           } | ||||
|         }); | ||||
|       } else if (returnValue === undefined) { | ||||
|         done(); | ||||
|       } else { | ||||
|         done.fail( | ||||
|           new Error( | ||||
|             'Jest: `it` and `test` must return either a Promise or undefined.' | ||||
|           ) | ||||
|         ); | ||||
|       } | ||||
|     }; | ||||
|  | ||||
|     return originalFn.call(env, specName, asyncJestTest, timeout); | ||||
|   }; | ||||
| } | ||||
|  | ||||
| function makeConcurrent(originalFn, env, mutex) { | ||||
|   return function(specName, fn, timeout) { | ||||
|     if ( | ||||
|       env != null && | ||||
|       !env.specFilter({ | ||||
|         getFullName: () => specName || '' | ||||
|       }) | ||||
|     ) { | ||||
|       return originalFn.call(env, specName, () => Promise.resolve(), timeout); | ||||
|     } | ||||
|  | ||||
|     let promise; | ||||
|  | ||||
|     try { | ||||
|       promise = mutex(() => { | ||||
|         const promise = fn(); | ||||
|  | ||||
|         if (isPromise(promise)) { | ||||
|           return promise; | ||||
|         } | ||||
|  | ||||
|         throw new Error( | ||||
|           `Jest: concurrent test "${specName}" must return a Promise.` | ||||
|         ); | ||||
|       }); | ||||
|     } catch (error) { | ||||
|       return originalFn.call(env, specName, () => Promise.reject(error)); | ||||
|     } | ||||
|  | ||||
|     return originalFn.call(env, specName, () => promise, timeout); | ||||
|   }; | ||||
| } | ||||
|  | ||||
| function jasmineAsyncInstall(globalConfig, global) { | ||||
|   const jasmine = global.jasmine; | ||||
|   const mutex = (0, _throat.default)(globalConfig.maxConcurrency); | ||||
|   const env = jasmine.getEnv(); | ||||
|   env.it = promisifyIt(env.it, env, jasmine); | ||||
|   env.fit = promisifyIt(env.fit, env, jasmine); | ||||
|  | ||||
|   global.it.concurrent = (env => { | ||||
|     const concurrent = makeConcurrent(env.it, env, mutex); | ||||
|     concurrent.only = makeConcurrent(env.fit, env, mutex); | ||||
|     concurrent.skip = makeConcurrent(env.xit, env, mutex); | ||||
|     return concurrent; | ||||
|   })(env); | ||||
|  | ||||
|   global.fit.concurrent = makeConcurrent(env.fit, env, mutex); | ||||
|   env.afterAll = promisifyLifeCycleFunction(env.afterAll, env); | ||||
|   env.afterEach = promisifyLifeCycleFunction(env.afterEach, env); | ||||
|   env.beforeAll = promisifyLifeCycleFunction(env.beforeAll, env); | ||||
|   env.beforeEach = promisifyLifeCycleFunction(env.beforeEach, env); | ||||
| } | ||||
							
								
								
									
										11
									
								
								node_modules/jest-jasmine2/build/jestExpect.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								node_modules/jest-jasmine2/build/jestExpect.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,11 @@ | ||||
| /** | ||||
|  * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||||
|  * | ||||
|  * This source code is licensed under the MIT license found in the | ||||
|  * LICENSE file in the root directory of this source tree. | ||||
|  */ | ||||
| declare const _default: (config: { | ||||
|     expand: boolean; | ||||
| }) => void; | ||||
| export default _default; | ||||
| //# sourceMappingURL=jestExpect.d.ts.map | ||||
							
								
								
									
										1
									
								
								node_modules/jest-jasmine2/build/jestExpect.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/jest-jasmine2/build/jestExpect.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| {"version":3,"file":"jestExpect.d.ts","sourceRoot":"","sources":["../src/jestExpect.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;;;AAuBH,wBA+CE"} | ||||
							
								
								
									
										69
									
								
								node_modules/jest-jasmine2/build/jestExpect.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										69
									
								
								node_modules/jest-jasmine2/build/jestExpect.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,69 @@ | ||||
| 'use strict'; | ||||
|  | ||||
| Object.defineProperty(exports, '__esModule', { | ||||
|   value: true | ||||
| }); | ||||
| exports.default = void 0; | ||||
|  | ||||
| var _expect = _interopRequireDefault(require('expect')); | ||||
|  | ||||
| var _jestSnapshot = require('jest-snapshot'); | ||||
|  | ||||
| function _interopRequireDefault(obj) { | ||||
|   return obj && obj.__esModule ? obj : {default: obj}; | ||||
| } | ||||
|  | ||||
| /** | ||||
|  * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||||
|  * | ||||
|  * This source code is licensed under the MIT license found in the | ||||
|  * LICENSE file in the root directory of this source tree. | ||||
|  */ | ||||
| var _default = config => { | ||||
|   global.expect = _expect.default; | ||||
|  | ||||
|   _expect.default.setState({ | ||||
|     expand: config.expand | ||||
|   }); | ||||
|  | ||||
|   _expect.default.extend({ | ||||
|     toMatchInlineSnapshot: _jestSnapshot.toMatchInlineSnapshot, | ||||
|     toMatchSnapshot: _jestSnapshot.toMatchSnapshot, | ||||
|     toThrowErrorMatchingInlineSnapshot: | ||||
|       _jestSnapshot.toThrowErrorMatchingInlineSnapshot, | ||||
|     toThrowErrorMatchingSnapshot: _jestSnapshot.toThrowErrorMatchingSnapshot | ||||
|   }); | ||||
|  | ||||
|   _expect.default.addSnapshotSerializer = _jestSnapshot.addSerializer; | ||||
|   const jasmine = global.jasmine; | ||||
|   jasmine.anything = _expect.default.anything; | ||||
|   jasmine.any = _expect.default.any; | ||||
|   jasmine.objectContaining = _expect.default.objectContaining; | ||||
|   jasmine.arrayContaining = _expect.default.arrayContaining; | ||||
|   jasmine.stringMatching = _expect.default.stringMatching; | ||||
|  | ||||
|   jasmine.addMatchers = jasmineMatchersObject => { | ||||
|     const jestMatchersObject = Object.create(null); | ||||
|     Object.keys(jasmineMatchersObject).forEach(name => { | ||||
|       jestMatchersObject[name] = function(...args) { | ||||
|         // use "expect.extend" if you need to use equality testers (via this.equal) | ||||
|         const result = jasmineMatchersObject[name](null, null); // if there is no 'negativeCompare', both should be handled by `compare` | ||||
|  | ||||
|         const negativeCompare = result.negativeCompare || result.compare; | ||||
|         return this.isNot | ||||
|           ? negativeCompare.apply( | ||||
|               null, // @ts-ignore | ||||
|               args | ||||
|             ) | ||||
|           : result.compare.apply( | ||||
|               null, // @ts-ignore | ||||
|               args | ||||
|             ); | ||||
|       }; | ||||
|     }); | ||||
|     const expect = global.expect; | ||||
|     expect.extend(jestMatchersObject); | ||||
|   }; | ||||
| }; | ||||
|  | ||||
| exports.default = _default; | ||||
							
								
								
									
										8
									
								
								node_modules/jest-jasmine2/build/pTimeout.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								node_modules/jest-jasmine2/build/pTimeout.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,8 @@ | ||||
| /** | ||||
|  * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||||
|  * | ||||
|  * This source code is licensed under the MIT license found in the | ||||
|  * LICENSE file in the root directory of this source tree. | ||||
|  */ | ||||
| export default function pTimeout(promise: Promise<any>, ms: number, clearTimeout: NodeJS.Global['clearTimeout'], setTimeout: NodeJS.Global['setTimeout'], onTimeout: () => any): Promise<any>; | ||||
| //# sourceMappingURL=pTimeout.d.ts.map | ||||
							
								
								
									
										1
									
								
								node_modules/jest-jasmine2/build/pTimeout.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/jest-jasmine2/build/pTimeout.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| {"version":3,"file":"pTimeout.d.ts","sourceRoot":"","sources":["../src/pTimeout.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,CAAC,OAAO,UAAU,QAAQ,CAC9B,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,EACrB,EAAE,EAAE,MAAM,EACV,YAAY,EAAE,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,EAC3C,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,EACvC,SAAS,EAAE,MAAM,GAAG,GACnB,OAAO,CAAC,GAAG,CAAC,CAcd"} | ||||
							
								
								
									
										33
									
								
								node_modules/jest-jasmine2/build/pTimeout.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								node_modules/jest-jasmine2/build/pTimeout.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,33 @@ | ||||
| 'use strict'; | ||||
|  | ||||
| Object.defineProperty(exports, '__esModule', { | ||||
|   value: true | ||||
| }); | ||||
| exports.default = pTimeout; | ||||
| var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; | ||||
| var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; | ||||
| var Promise = global[Symbol.for('jest-native-promise')] || global.Promise; | ||||
|  | ||||
| /** | ||||
|  * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||||
|  * | ||||
|  * This source code is licensed under the MIT license found in the | ||||
|  * LICENSE file in the root directory of this source tree. | ||||
|  */ | ||||
| // A specialized version of `p-timeout` that does not touch globals. | ||||
| // It does not throw on timeout. | ||||
| function pTimeout(promise, ms, clearTimeout, setTimeout, onTimeout) { | ||||
|   return new Promise((resolve, reject) => { | ||||
|     const timer = setTimeout(() => resolve(onTimeout()), ms); | ||||
|     promise.then( | ||||
|       val => { | ||||
|         clearTimeout(timer); | ||||
|         resolve(val); | ||||
|       }, | ||||
|       err => { | ||||
|         clearTimeout(timer); | ||||
|         reject(err); | ||||
|       } | ||||
|     ); | ||||
|   }); | ||||
| } | ||||
							
								
								
									
										27
									
								
								node_modules/jest-jasmine2/build/queueRunner.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								node_modules/jest-jasmine2/build/queueRunner.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,27 @@ | ||||
| /** | ||||
|  * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||||
|  * | ||||
|  * This source code is licensed under the MIT license found in the | ||||
|  * LICENSE file in the root directory of this source tree. | ||||
|  */ | ||||
| declare type Global = NodeJS.Global; | ||||
| export declare type Options = { | ||||
|     clearTimeout: Global['clearTimeout']; | ||||
|     fail: (error: Error) => void; | ||||
|     onException: (error: Error) => void; | ||||
|     queueableFns: Array<QueueableFn>; | ||||
|     setTimeout: Global['setTimeout']; | ||||
|     userContext: any; | ||||
| }; | ||||
| export declare type QueueableFn = { | ||||
|     fn: (done: (error?: any) => void) => void; | ||||
|     timeout?: () => number; | ||||
|     initError?: Error; | ||||
| }; | ||||
| export default function queueRunner(options: Options): { | ||||
|     cancel: any; | ||||
|     catch: <TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null | undefined) => Promise<void | TResult>; | ||||
|     then: <TResult1 = void, TResult2 = never>(onfulfilled?: ((value: void) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined) => Promise<TResult1 | TResult2>; | ||||
| }; | ||||
| export {}; | ||||
| //# sourceMappingURL=queueRunner.d.ts.map | ||||
							
								
								
									
										1
									
								
								node_modules/jest-jasmine2/build/queueRunner.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/jest-jasmine2/build/queueRunner.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| {"version":3,"file":"queueRunner.d.ts","sourceRoot":"","sources":["../src/queueRunner.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,aAAK,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AAE5B,oBAAY,OAAO,GAAG;IACpB,YAAY,EAAE,MAAM,CAAC,cAAc,CAAC,CAAC;IACrC,IAAI,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAC7B,WAAW,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACpC,YAAY,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IACjC,UAAU,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC;IACjC,WAAW,EAAE,GAAG,CAAC;CAClB,CAAC;AAEF,oBAAY,WAAW,GAAG;IACxB,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,EAAE,GAAG,KAAK,IAAI,KAAK,IAAI,CAAC;IAC1C,OAAO,CAAC,EAAE,MAAM,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,KAAK,CAAC;CACnB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,OAAO,EAAE,OAAO;;;;EA6DnD"} | ||||
							
								
								
									
										81
									
								
								node_modules/jest-jasmine2/build/queueRunner.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										81
									
								
								node_modules/jest-jasmine2/build/queueRunner.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,81 @@ | ||||
| 'use strict'; | ||||
|  | ||||
| Object.defineProperty(exports, '__esModule', { | ||||
|   value: true | ||||
| }); | ||||
| exports.default = queueRunner; | ||||
|  | ||||
| var _PCancelable = _interopRequireDefault(require('./PCancelable')); | ||||
|  | ||||
| var _pTimeout = _interopRequireDefault(require('./pTimeout')); | ||||
|  | ||||
| function _interopRequireDefault(obj) { | ||||
|   return obj && obj.__esModule ? obj : {default: obj}; | ||||
| } | ||||
|  | ||||
| var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; | ||||
| var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; | ||||
| var Promise = global[Symbol.for('jest-native-promise')] || global.Promise; | ||||
|  | ||||
| function queueRunner(options) { | ||||
|   const token = new _PCancelable.default((onCancel, resolve) => { | ||||
|     onCancel(resolve); | ||||
|   }); | ||||
|  | ||||
|   const mapper = ({fn, timeout, initError = new Error()}) => { | ||||
|     let promise = new Promise(resolve => { | ||||
|       const next = function next(...args) { | ||||
|         const err = args[0]; | ||||
|  | ||||
|         if (err) { | ||||
|           options.fail.apply(null, args); | ||||
|         } | ||||
|  | ||||
|         resolve(); | ||||
|       }; | ||||
|  | ||||
|       next.fail = function(...args) { | ||||
|         options.fail.apply(null, args); | ||||
|         resolve(); | ||||
|       }; | ||||
|  | ||||
|       try { | ||||
|         fn.call(options.userContext, next); | ||||
|       } catch (e) { | ||||
|         options.onException(e); | ||||
|         resolve(); | ||||
|       } | ||||
|     }); | ||||
|     promise = Promise.race([promise, token]); | ||||
|  | ||||
|     if (!timeout) { | ||||
|       return promise; | ||||
|     } | ||||
|  | ||||
|     const timeoutMs = timeout(); | ||||
|     return (0, _pTimeout.default)( | ||||
|       promise, | ||||
|       timeoutMs, | ||||
|       options.clearTimeout, | ||||
|       options.setTimeout, | ||||
|       () => { | ||||
|         initError.message = | ||||
|           'Timeout - Async callback was not invoked within the ' + | ||||
|           timeoutMs + | ||||
|           'ms timeout specified by jest.setTimeout.'; | ||||
|         initError.stack = initError.message + initError.stack; | ||||
|         options.onException(initError); | ||||
|       } | ||||
|     ); | ||||
|   }; | ||||
|  | ||||
|   const result = options.queueableFns.reduce( | ||||
|     (promise, fn) => promise.then(() => mapper(fn)), | ||||
|     Promise.resolve() | ||||
|   ); | ||||
|   return { | ||||
|     cancel: token.cancel.bind(token), | ||||
|     catch: result.catch.bind(result), | ||||
|     then: result.then.bind(result) | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										32
									
								
								node_modules/jest-jasmine2/build/reporter.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								node_modules/jest-jasmine2/build/reporter.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,32 @@ | ||||
| /** | ||||
|  * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||||
|  * | ||||
|  * This source code is licensed under the MIT license found in the | ||||
|  * LICENSE file in the root directory of this source tree. | ||||
|  */ | ||||
| import { Config } from '@jest/types'; | ||||
| import { TestResult } from '@jest/test-result'; | ||||
| import { SpecResult } from './jasmine/Spec'; | ||||
| import { SuiteResult } from './jasmine/Suite'; | ||||
| import { Reporter, RunDetails } from './types'; | ||||
| export default class Jasmine2Reporter implements Reporter { | ||||
|     private _testResults; | ||||
|     private _globalConfig; | ||||
|     private _config; | ||||
|     private _currentSuites; | ||||
|     private _resolve; | ||||
|     private _resultsPromise; | ||||
|     private _startTimes; | ||||
|     private _testPath; | ||||
|     constructor(globalConfig: Config.GlobalConfig, config: Config.ProjectConfig, testPath: Config.Path); | ||||
|     jasmineStarted(_runDetails: RunDetails): void; | ||||
|     specStarted(spec: SpecResult): void; | ||||
|     specDone(result: SpecResult): void; | ||||
|     suiteStarted(suite: SuiteResult): void; | ||||
|     suiteDone(_result: SuiteResult): void; | ||||
|     jasmineDone(_runDetails: RunDetails): void; | ||||
|     getResults(): Promise<TestResult>; | ||||
|     private _addMissingMessageToStack; | ||||
|     private _extractSpecResults; | ||||
| } | ||||
| //# sourceMappingURL=reporter.d.ts.map | ||||
							
								
								
									
										1
									
								
								node_modules/jest-jasmine2/build/reporter.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/jest-jasmine2/build/reporter.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| {"version":3,"file":"reporter.d.ts","sourceRoot":"","sources":["../src/reporter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAkB,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAE9D,OAAO,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAC,WAAW,EAAC,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAC,QAAQ,EAAE,UAAU,EAAC,MAAM,SAAS,CAAC;AAI7C,MAAM,CAAC,OAAO,OAAO,gBAAiB,YAAW,QAAQ;IACvD,OAAO,CAAC,YAAY,CAAyB;IAC7C,OAAO,CAAC,aAAa,CAAsB;IAC3C,OAAO,CAAC,OAAO,CAAuB;IACtC,OAAO,CAAC,cAAc,CAAgB;IACtC,OAAO,CAAC,QAAQ,CAAM;IACtB,OAAO,CAAC,eAAe,CAAsB;IAC7C,OAAO,CAAC,WAAW,CAA4B;IAC/C,OAAO,CAAC,SAAS,CAAc;gBAG7B,YAAY,EAAE,MAAM,CAAC,YAAY,EACjC,MAAM,EAAE,MAAM,CAAC,aAAa,EAC5B,QAAQ,EAAE,MAAM,CAAC,IAAI;IAYvB,cAAc,CAAC,WAAW,EAAE,UAAU;IAEtC,WAAW,CAAC,IAAI,EAAE,UAAU;IAI5B,QAAQ,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI;IAMlC,YAAY,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI;IAItC,SAAS,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI;IAIrC,WAAW,CAAC,WAAW,EAAE,UAAU,GAAG,IAAI;IAiD1C,UAAU,IAAI,OAAO,CAAC,UAAU,CAAC;IAIjC,OAAO,CAAC,yBAAyB;IAWjC,OAAO,CAAC,mBAAmB;CAmC5B"} | ||||
							
								
								
									
										176
									
								
								node_modules/jest-jasmine2/build/reporter.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										176
									
								
								node_modules/jest-jasmine2/build/reporter.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,176 @@ | ||||
| 'use strict'; | ||||
|  | ||||
| Object.defineProperty(exports, '__esModule', { | ||||
|   value: true | ||||
| }); | ||||
| exports.default = void 0; | ||||
|  | ||||
| var _jestMessageUtil = require('jest-message-util'); | ||||
|  | ||||
| var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; | ||||
| var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; | ||||
| var jestNow = global[Symbol.for('jest-native-now')] || global.Date.now; | ||||
| var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; | ||||
| var Promise = global[Symbol.for('jest-native-promise')] || global.Promise; | ||||
|  | ||||
| function _defineProperty(obj, key, value) { | ||||
|   if (key in obj) { | ||||
|     Object.defineProperty(obj, key, { | ||||
|       value: value, | ||||
|       enumerable: true, | ||||
|       configurable: true, | ||||
|       writable: true | ||||
|     }); | ||||
|   } else { | ||||
|     obj[key] = value; | ||||
|   } | ||||
|   return obj; | ||||
| } | ||||
|  | ||||
| class Jasmine2Reporter { | ||||
|   constructor(globalConfig, config, testPath) { | ||||
|     _defineProperty(this, '_testResults', void 0); | ||||
|  | ||||
|     _defineProperty(this, '_globalConfig', void 0); | ||||
|  | ||||
|     _defineProperty(this, '_config', void 0); | ||||
|  | ||||
|     _defineProperty(this, '_currentSuites', void 0); | ||||
|  | ||||
|     _defineProperty(this, '_resolve', void 0); | ||||
|  | ||||
|     _defineProperty(this, '_resultsPromise', void 0); | ||||
|  | ||||
|     _defineProperty(this, '_startTimes', void 0); | ||||
|  | ||||
|     _defineProperty(this, '_testPath', void 0); | ||||
|  | ||||
|     this._globalConfig = globalConfig; | ||||
|     this._config = config; | ||||
|     this._testPath = testPath; | ||||
|     this._testResults = []; | ||||
|     this._currentSuites = []; | ||||
|     this._resolve = null; | ||||
|     this._resultsPromise = new Promise(resolve => (this._resolve = resolve)); | ||||
|     this._startTimes = new Map(); | ||||
|   } | ||||
|  | ||||
|   jasmineStarted(_runDetails) {} | ||||
|  | ||||
|   specStarted(spec) { | ||||
|     this._startTimes.set(spec.id, jestNow()); | ||||
|   } | ||||
|  | ||||
|   specDone(result) { | ||||
|     this._testResults.push( | ||||
|       this._extractSpecResults(result, this._currentSuites.slice(0)) | ||||
|     ); | ||||
|   } | ||||
|  | ||||
|   suiteStarted(suite) { | ||||
|     this._currentSuites.push(suite.description); | ||||
|   } | ||||
|  | ||||
|   suiteDone(_result) { | ||||
|     this._currentSuites.pop(); | ||||
|   } | ||||
|  | ||||
|   jasmineDone(_runDetails) { | ||||
|     let numFailingTests = 0; | ||||
|     let numPassingTests = 0; | ||||
|     let numPendingTests = 0; | ||||
|     let numTodoTests = 0; | ||||
|     const testResults = this._testResults; | ||||
|     testResults.forEach(testResult => { | ||||
|       if (testResult.status === 'failed') { | ||||
|         numFailingTests++; | ||||
|       } else if (testResult.status === 'pending') { | ||||
|         numPendingTests++; | ||||
|       } else if (testResult.status === 'todo') { | ||||
|         numTodoTests++; | ||||
|       } else { | ||||
|         numPassingTests++; | ||||
|       } | ||||
|     }); | ||||
|     const testResult = { | ||||
|       console: null, | ||||
|       failureMessage: (0, _jestMessageUtil.formatResultsErrors)( | ||||
|         testResults, | ||||
|         this._config, | ||||
|         this._globalConfig, | ||||
|         this._testPath | ||||
|       ), | ||||
|       numFailingTests, | ||||
|       numPassingTests, | ||||
|       numPendingTests, | ||||
|       numTodoTests, | ||||
|       perfStats: { | ||||
|         end: 0, | ||||
|         start: 0 | ||||
|       }, | ||||
|       snapshot: { | ||||
|         added: 0, | ||||
|         fileDeleted: false, | ||||
|         matched: 0, | ||||
|         unchecked: 0, | ||||
|         unmatched: 0, | ||||
|         updated: 0 | ||||
|       }, | ||||
|       testFilePath: this._testPath, | ||||
|       testResults | ||||
|     }; | ||||
|  | ||||
|     this._resolve(testResult); | ||||
|   } | ||||
|  | ||||
|   getResults() { | ||||
|     return this._resultsPromise; | ||||
|   } | ||||
|  | ||||
|   _addMissingMessageToStack(stack, message) { | ||||
|     // Some errors (e.g. Angular injection error) don't prepend error.message | ||||
|     // to stack, instead the first line of the stack is just plain 'Error' | ||||
|     const ERROR_REGEX = /^Error:?\s*\n/; | ||||
|  | ||||
|     if (stack && message && !stack.includes(message)) { | ||||
|       return message + stack.replace(ERROR_REGEX, '\n'); | ||||
|     } | ||||
|  | ||||
|     return stack; | ||||
|   } | ||||
|  | ||||
|   _extractSpecResults(specResult, ancestorTitles) { | ||||
|     const start = this._startTimes.get(specResult.id); | ||||
|  | ||||
|     const duration = start ? jestNow() - start : undefined; | ||||
|     const status = | ||||
|       specResult.status === 'disabled' ? 'pending' : specResult.status; | ||||
|     const location = specResult.__callsite | ||||
|       ? { | ||||
|           column: specResult.__callsite.getColumnNumber(), | ||||
|           line: specResult.__callsite.getLineNumber() | ||||
|         } | ||||
|       : null; | ||||
|     const results = { | ||||
|       ancestorTitles, | ||||
|       duration, | ||||
|       failureMessages: [], | ||||
|       fullName: specResult.fullName, | ||||
|       location, | ||||
|       numPassingAsserts: 0, | ||||
|       // Jasmine2 only returns an array of failed asserts. | ||||
|       status, | ||||
|       title: specResult.description | ||||
|     }; | ||||
|     specResult.failedExpectations.forEach(failed => { | ||||
|       const message = | ||||
|         !failed.matcherName && failed.stack | ||||
|           ? this._addMissingMessageToStack(failed.stack, failed.message) | ||||
|           : failed.message || ''; | ||||
|       results.failureMessages.push(message); | ||||
|     }); | ||||
|     return results; | ||||
|   } | ||||
| } | ||||
|  | ||||
| exports.default = Jasmine2Reporter; | ||||
							
								
								
									
										17
									
								
								node_modules/jest-jasmine2/build/setup_jest_globals.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								node_modules/jest-jasmine2/build/setup_jest_globals.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,17 @@ | ||||
| /** | ||||
|  * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||||
|  * | ||||
|  * This source code is licensed under the MIT license found in the | ||||
|  * LICENSE file in the root directory of this source tree. | ||||
|  */ | ||||
| import { Config } from '@jest/types'; | ||||
| import { Plugin } from 'pretty-format'; | ||||
| export declare type SetupOptions = { | ||||
|     config: Config.ProjectConfig; | ||||
|     globalConfig: Config.GlobalConfig; | ||||
|     localRequire: (moduleName: string) => Plugin; | ||||
|     testPath: Config.Path; | ||||
| }; | ||||
| declare const _default: ({ config, globalConfig, localRequire, testPath, }: SetupOptions) => import("jest-snapshot/build/State").default; | ||||
| export default _default; | ||||
| //# sourceMappingURL=setup_jest_globals.d.ts.map | ||||
							
								
								
									
										1
									
								
								node_modules/jest-jasmine2/build/setup_jest_globals.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/jest-jasmine2/build/setup_jest_globals.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| {"version":3,"file":"setup_jest_globals.d.ts","sourceRoot":"","sources":["../src/setup_jest_globals.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,MAAM,EAAS,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAC,MAAM,EAAC,MAAM,eAAe,CAAC;AAYrC,oBAAY,YAAY,GAAG;IACzB,MAAM,EAAE,MAAM,CAAC,aAAa,CAAC;IAC7B,YAAY,EAAE,MAAM,CAAC,YAAY,CAAC;IAClC,YAAY,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,MAAM,CAAC;IAC7C,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC;CACvB,CAAC;;AA6DF,wBA6BE"} | ||||
							
								
								
									
										117
									
								
								node_modules/jest-jasmine2/build/setup_jest_globals.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										117
									
								
								node_modules/jest-jasmine2/build/setup_jest_globals.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,117 @@ | ||||
| 'use strict'; | ||||
|  | ||||
| Object.defineProperty(exports, '__esModule', { | ||||
|   value: true | ||||
| }); | ||||
| exports.default = void 0; | ||||
|  | ||||
| var _expect = require('expect'); | ||||
|  | ||||
| var _jestSnapshot = require('jest-snapshot'); | ||||
|  | ||||
| /** | ||||
|  * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||||
|  * | ||||
|  * This source code is licensed under the MIT license found in the | ||||
|  * LICENSE file in the root directory of this source tree. | ||||
|  */ | ||||
| // Get suppressed errors form  jest-matchers that weren't throw during | ||||
| // test execution and add them to the test result, potentially failing | ||||
| // a passing test. | ||||
| const addSuppressedErrors = result => { | ||||
|   const _getState = (0, _expect.getState)(), | ||||
|     suppressedErrors = _getState.suppressedErrors; | ||||
|  | ||||
|   (0, _expect.setState)({ | ||||
|     suppressedErrors: [] | ||||
|   }); | ||||
|  | ||||
|   if (suppressedErrors.length) { | ||||
|     result.status = 'failed'; | ||||
|     result.failedExpectations = suppressedErrors.map(error => ({ | ||||
|       actual: '', | ||||
|       // passing error for custom test reporters | ||||
|       error, | ||||
|       expected: '', | ||||
|       matcherName: '', | ||||
|       message: error.message, | ||||
|       passed: false, | ||||
|       stack: error.stack | ||||
|     })); | ||||
|   } | ||||
| }; | ||||
|  | ||||
| const addAssertionErrors = result => { | ||||
|   const assertionErrors = (0, _expect.extractExpectedAssertionsErrors)(); | ||||
|  | ||||
|   if (assertionErrors.length) { | ||||
|     const jasmineErrors = assertionErrors.map(({actual, error, expected}) => ({ | ||||
|       actual, | ||||
|       expected, | ||||
|       message: error.stack, | ||||
|       passed: false | ||||
|     })); | ||||
|     result.status = 'failed'; | ||||
|     result.failedExpectations = result.failedExpectations.concat(jasmineErrors); | ||||
|   } | ||||
| }; | ||||
|  | ||||
| const patchJasmine = () => { | ||||
|   global.jasmine.Spec = (realSpec => { | ||||
|     class Spec extends realSpec { | ||||
|       constructor(attr) { | ||||
|         const resultCallback = attr.resultCallback; | ||||
|  | ||||
|         attr.resultCallback = function(result) { | ||||
|           addSuppressedErrors(result); | ||||
|           addAssertionErrors(result); | ||||
|           resultCallback.call(attr, result); | ||||
|         }; | ||||
|  | ||||
|         const onStart = attr.onStart; | ||||
|  | ||||
|         attr.onStart = context => { | ||||
|           (0, _expect.setState)({ | ||||
|             currentTestName: context.getFullName() | ||||
|           }); | ||||
|           onStart && onStart.call(attr, context); | ||||
|         }; | ||||
|  | ||||
|         super(attr); | ||||
|       } | ||||
|     } | ||||
|  | ||||
|     return Spec; | ||||
|   })(global.jasmine.Spec); | ||||
| }; | ||||
|  | ||||
| var _default = ({config, globalConfig, localRequire, testPath}) => { | ||||
|   // Jest tests snapshotSerializers in order preceding built-in serializers. | ||||
|   // Therefore, add in reverse because the last added is the first tested. | ||||
|   config.snapshotSerializers | ||||
|     .concat() | ||||
|     .reverse() | ||||
|     .forEach(path => { | ||||
|       (0, _jestSnapshot.addSerializer)(localRequire(path)); | ||||
|     }); | ||||
|   patchJasmine(); | ||||
|   const expand = globalConfig.expand, | ||||
|     updateSnapshot = globalConfig.updateSnapshot; | ||||
|   const snapshotResolver = (0, _jestSnapshot.buildSnapshotResolver)(config); | ||||
|   const snapshotPath = snapshotResolver.resolveSnapshotPath(testPath); | ||||
|   const snapshotState = new _jestSnapshot.SnapshotState(snapshotPath, { | ||||
|     expand, | ||||
|     getBabelTraverse: () => require('@babel/traverse').default, | ||||
|     getPrettier: () => | ||||
|       config.prettierPath ? require(config.prettierPath) : null, | ||||
|     updateSnapshot | ||||
|   }); | ||||
|   (0, _expect.setState)({ | ||||
|     snapshotState, | ||||
|     testPath | ||||
|   }); // Return it back to the outer scope (test runner outside the VM). | ||||
|  | ||||
|   return snapshotState; | ||||
| }; | ||||
|  | ||||
| exports.default = _default; | ||||
							
								
								
									
										27
									
								
								node_modules/jest-jasmine2/build/treeProcessor.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								node_modules/jest-jasmine2/build/treeProcessor.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,27 @@ | ||||
| /** | ||||
|  * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||||
|  * | ||||
|  * This source code is licensed under the MIT license found in the | ||||
|  * LICENSE file in the root directory of this source tree. | ||||
|  */ | ||||
| import Suite from './jasmine/Suite'; | ||||
| declare type Options = { | ||||
|     nodeComplete: (suite: TreeNode) => void; | ||||
|     nodeStart: (suite: TreeNode) => void; | ||||
|     queueRunnerFactory: any; | ||||
|     runnableIds: Array<string>; | ||||
|     tree: TreeNode; | ||||
| }; | ||||
| export declare type TreeNode = { | ||||
|     afterAllFns: Array<any>; | ||||
|     beforeAllFns: Array<any>; | ||||
|     disabled?: boolean; | ||||
|     execute: (onComplete: () => void, enabled: boolean) => void; | ||||
|     id: string; | ||||
|     onException: (error: Error) => void; | ||||
|     sharedUserContext: () => any; | ||||
|     children?: Array<TreeNode>; | ||||
| } & Pick<Suite, 'getResult' | 'parentSuite' | 'result'>; | ||||
| export default function treeProcessor(options: Options): void; | ||||
| export {}; | ||||
| //# sourceMappingURL=treeProcessor.d.ts.map | ||||
							
								
								
									
										1
									
								
								node_modules/jest-jasmine2/build/treeProcessor.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/jest-jasmine2/build/treeProcessor.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| {"version":3,"file":"treeProcessor.d.ts","sourceRoot":"","sources":["../src/treeProcessor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,MAAM,iBAAiB,CAAC;AAEpC,aAAK,OAAO,GAAG;IACb,YAAY,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,CAAC;IACxC,SAAS,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,CAAC;IACrC,kBAAkB,EAAE,GAAG,CAAC;IACxB,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3B,IAAI,EAAE,QAAQ,CAAC;CAChB,CAAC;AAEF,oBAAY,QAAQ,GAAG;IACrB,WAAW,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IACxB,YAAY,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,CAAC,UAAU,EAAE,MAAM,IAAI,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5D,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACpC,iBAAiB,EAAE,MAAM,GAAG,CAAC;IAC7B,QAAQ,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;CAC5B,GAAG,IAAI,CAAC,KAAK,EAAE,WAAW,GAAG,aAAa,GAAG,QAAQ,CAAC,CAAC;AAExD,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,OAAO,EAAE,OAAO,QA6DrD"} | ||||
							
								
								
									
										123
									
								
								node_modules/jest-jasmine2/build/treeProcessor.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										123
									
								
								node_modules/jest-jasmine2/build/treeProcessor.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,123 @@ | ||||
| 'use strict'; | ||||
|  | ||||
| Object.defineProperty(exports, '__esModule', { | ||||
|   value: true | ||||
| }); | ||||
| exports.default = treeProcessor; | ||||
| var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; | ||||
| var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol; | ||||
| var Promise = global[Symbol.for('jest-native-promise')] || global.Promise; | ||||
|  | ||||
| function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { | ||||
|   try { | ||||
|     var info = gen[key](arg); | ||||
|     var value = info.value; | ||||
|   } catch (error) { | ||||
|     reject(error); | ||||
|     return; | ||||
|   } | ||||
|   if (info.done) { | ||||
|     resolve(value); | ||||
|   } else { | ||||
|     Promise.resolve(value).then(_next, _throw); | ||||
|   } | ||||
| } | ||||
|  | ||||
| function _asyncToGenerator(fn) { | ||||
|   return function() { | ||||
|     var self = this, | ||||
|       args = arguments; | ||||
|     return new Promise(function(resolve, reject) { | ||||
|       var gen = fn.apply(self, args); | ||||
|       function _next(value) { | ||||
|         asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'next', value); | ||||
|       } | ||||
|       function _throw(err) { | ||||
|         asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err); | ||||
|       } | ||||
|       _next(undefined); | ||||
|     }); | ||||
|   }; | ||||
| } | ||||
|  | ||||
| /** | ||||
|  * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||||
|  * | ||||
|  * This source code is licensed under the MIT license found in the | ||||
|  * LICENSE file in the root directory of this source tree. | ||||
|  */ | ||||
| function treeProcessor(options) { | ||||
|   const nodeComplete = options.nodeComplete, | ||||
|     nodeStart = options.nodeStart, | ||||
|     queueRunnerFactory = options.queueRunnerFactory, | ||||
|     runnableIds = options.runnableIds, | ||||
|     tree = options.tree; | ||||
|  | ||||
|   function isEnabled(node, parentEnabled) { | ||||
|     return parentEnabled || runnableIds.indexOf(node.id) !== -1; | ||||
|   } | ||||
|  | ||||
|   function getNodeHandler(node, parentEnabled) { | ||||
|     const enabled = isEnabled(node, parentEnabled); | ||||
|     return node.children | ||||
|       ? getNodeWithChildrenHandler(node, enabled) | ||||
|       : getNodeWithoutChildrenHandler(node, enabled); | ||||
|   } | ||||
|  | ||||
|   function getNodeWithoutChildrenHandler(node, enabled) { | ||||
|     return function fn(done = () => {}) { | ||||
|       node.execute(done, enabled); | ||||
|     }; | ||||
|   } | ||||
|  | ||||
|   function getNodeWithChildrenHandler(node, enabled) { | ||||
|     return ( | ||||
|       /*#__PURE__*/ | ||||
|       (function() { | ||||
|         var _fn = _asyncToGenerator(function*(done = () => {}) { | ||||
|           nodeStart(node); | ||||
|           yield queueRunnerFactory({ | ||||
|             onException: error => node.onException(error), | ||||
|             queueableFns: wrapChildren(node, enabled), | ||||
|             userContext: node.sharedUserContext() | ||||
|           }); | ||||
|           nodeComplete(node); | ||||
|           done(); | ||||
|         }); | ||||
|  | ||||
|         function fn() { | ||||
|           return _fn.apply(this, arguments); | ||||
|         } | ||||
|  | ||||
|         return fn; | ||||
|       })() | ||||
|     ); | ||||
|   } | ||||
|  | ||||
|   function hasEnabledTest(node) { | ||||
|     if (node.children) { | ||||
|       return node.children.some(hasEnabledTest); | ||||
|     } | ||||
|  | ||||
|     return !node.disabled; | ||||
|   } | ||||
|  | ||||
|   function wrapChildren(node, enabled) { | ||||
|     if (!node.children) { | ||||
|       throw new Error('`node.children` is not defined.'); | ||||
|     } | ||||
|  | ||||
|     const children = node.children.map(child => ({ | ||||
|       fn: getNodeHandler(child, enabled) | ||||
|     })); | ||||
|  | ||||
|     if (!hasEnabledTest(node)) { | ||||
|       return children; | ||||
|     } | ||||
|  | ||||
|     return node.beforeAllFns.concat(children).concat(node.afterAllFns); | ||||
|   } | ||||
|  | ||||
|   const treeHandler = getNodeHandler(tree, false); | ||||
|   return treeHandler(); | ||||
| } | ||||
							
								
								
									
										73
									
								
								node_modules/jest-jasmine2/build/types.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										73
									
								
								node_modules/jest-jasmine2/build/types.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,73 @@ | ||||
| /** | ||||
|  * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||||
|  * | ||||
|  * This source code is licensed under the MIT license found in the | ||||
|  * LICENSE file in the root directory of this source tree. | ||||
|  */ | ||||
| /// <reference types="node" /> | ||||
| import { AssertionError } from 'assert'; | ||||
| import { Config } from '@jest/types'; | ||||
| import expect from 'expect'; | ||||
| import Spec, { SpecResult } from './jasmine/Spec'; | ||||
| import JsApiReporter from './jasmine/JsApiReporter'; | ||||
| import Timer from './jasmine/Timer'; | ||||
| import Env from './jasmine/Env'; | ||||
| import createSpy from './jasmine/createSpy'; | ||||
| import ReportDispatcher from './jasmine/ReportDispatcher'; | ||||
| import SpyRegistry from './jasmine/spyRegistry'; | ||||
| import Suite, { SuiteResult } from './jasmine/Suite'; | ||||
| import SpyStrategy from './jasmine/SpyStrategy'; | ||||
| import CallTracker from './jasmine/CallTracker'; | ||||
| export interface AssertionErrorWithStack extends AssertionError { | ||||
|     stack: string; | ||||
| } | ||||
| export declare type SyncExpectationResult = { | ||||
|     pass: boolean; | ||||
|     message: () => string; | ||||
| }; | ||||
| export declare type AsyncExpectationResult = Promise<SyncExpectationResult>; | ||||
| export declare type ExpectationResult = SyncExpectationResult | AsyncExpectationResult; | ||||
| export declare type RawMatcherFn = (expected: any, actual: any, options?: any) => ExpectationResult; | ||||
| export declare type RunDetails = { | ||||
|     totalSpecsDefined?: number; | ||||
|     failedExpectations?: SuiteResult['failedExpectations']; | ||||
| }; | ||||
| export declare type Reporter = { | ||||
|     jasmineDone: (runDetails: RunDetails) => void; | ||||
|     jasmineStarted: (runDetails: RunDetails) => void; | ||||
|     specDone: (result: SpecResult) => void; | ||||
|     specStarted: (spec: SpecResult) => void; | ||||
|     suiteDone: (result: SuiteResult) => void; | ||||
|     suiteStarted: (result: SuiteResult) => void; | ||||
| }; | ||||
| export interface Spy extends Record<string, any> { | ||||
|     (this: Record<string, unknown>, ...args: Array<any>): unknown; | ||||
|     and: SpyStrategy; | ||||
|     calls: CallTracker; | ||||
|     restoreObjectToOriginalState?: () => void; | ||||
| } | ||||
| export declare type Jasmine = { | ||||
|     _DEFAULT_TIMEOUT_INTERVAL: number; | ||||
|     DEFAULT_TIMEOUT_INTERVAL: number; | ||||
|     currentEnv_: ReturnType<typeof Env>['prototype']; | ||||
|     getEnv: (options?: object) => ReturnType<typeof Env>['prototype']; | ||||
|     createSpy: typeof createSpy; | ||||
|     Env: ReturnType<typeof Env>; | ||||
|     JsApiReporter: typeof JsApiReporter; | ||||
|     ReportDispatcher: typeof ReportDispatcher; | ||||
|     Spec: typeof Spec; | ||||
|     SpyRegistry: typeof SpyRegistry; | ||||
|     Suite: typeof Suite; | ||||
|     Timer: typeof Timer; | ||||
|     version: string; | ||||
|     testPath: Config.Path; | ||||
|     addMatchers: Function; | ||||
| } & typeof expect & NodeJS.Global; | ||||
| declare global { | ||||
|     module NodeJS { | ||||
|         interface Global { | ||||
|             expect: typeof expect; | ||||
|         } | ||||
|     } | ||||
| } | ||||
| //# sourceMappingURL=types.d.ts.map | ||||
							
								
								
									
										1
									
								
								node_modules/jest-jasmine2/build/types.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/jest-jasmine2/build/types.d.ts.map
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAC,cAAc,EAAC,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAEnC,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,IAAI,EAAE,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAChD,OAAO,aAAa,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,MAAM,iBAAiB,CAAC;AACpC,OAAO,GAAG,MAAM,eAAe,CAAC;AAChC,OAAO,SAAS,MAAM,qBAAqB,CAAC;AAC5C,OAAO,gBAAgB,MAAM,4BAA4B,CAAC;AAC1D,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,KAAK,EAAE,EAAC,WAAW,EAAC,MAAM,iBAAiB,CAAC;AACnD,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAEhD,MAAM,WAAW,uBAAwB,SAAQ,cAAc;IAC7D,KAAK,EAAE,MAAM,CAAC;CACf;AAKD,oBAAY,qBAAqB,GAAG;IAClC,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,MAAM,CAAC;CACvB,CAAC;AAEF,oBAAY,sBAAsB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;AAEpE,oBAAY,iBAAiB,GAAG,qBAAqB,GAAG,sBAAsB,CAAC;AAE/E,oBAAY,YAAY,GAAG,CACzB,QAAQ,EAAE,GAAG,EACb,MAAM,EAAE,GAAG,EACX,OAAO,CAAC,EAAE,GAAG,KACV,iBAAiB,CAAC;AAGvB,oBAAY,UAAU,GAAG;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kBAAkB,CAAC,EAAE,WAAW,CAAC,oBAAoB,CAAC,CAAC;CACxD,CAAC;AAEF,oBAAY,QAAQ,GAAG;IACrB,WAAW,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAC;IAC9C,cAAc,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAC;IACjD,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;IACvC,WAAW,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;IACxC,SAAS,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IACzC,YAAY,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;CAC7C,CAAC;AAEF,MAAM,WAAW,GAAI,SAAQ,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAC9C,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC;IAC9D,GAAG,EAAE,WAAW,CAAC;IACjB,KAAK,EAAE,WAAW,CAAC;IACnB,4BAA4B,CAAC,EAAE,MAAM,IAAI,CAAC;CAC3C;AAED,oBAAY,OAAO,GAAG;IACpB,yBAAyB,EAAE,MAAM,CAAC;IAClC,wBAAwB,EAAE,MAAM,CAAC;IACjC,WAAW,EAAE,UAAU,CAAC,OAAO,GAAG,CAAC,CAAC,WAAW,CAAC,CAAC;IACjD,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,MAAM,KAAK,UAAU,CAAC,OAAO,GAAG,CAAC,CAAC,WAAW,CAAC,CAAC;IAClE,SAAS,EAAE,OAAO,SAAS,CAAC;IAC5B,GAAG,EAAE,UAAU,CAAC,OAAO,GAAG,CAAC,CAAC;IAC5B,aAAa,EAAE,OAAO,aAAa,CAAC;IACpC,gBAAgB,EAAE,OAAO,gBAAgB,CAAC;IAC1C,IAAI,EAAE,OAAO,IAAI,CAAC;IAClB,WAAW,EAAE,OAAO,WAAW,CAAC;IAChC,KAAK,EAAE,OAAO,KAAK,CAAC;IACpB,KAAK,EAAE,OAAO,KAAK,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC;IACtB,WAAW,EAAE,QAAQ,CAAC;CACvB,GAAG,OAAO,MAAM,GACf,MAAM,CAAC,MAAM,CAAC;AAEhB,OAAO,CAAC,MAAM,CAAC;IACb,OAAO,MAAM,CAAC;QACZ,UAAU,MAAM;YACd,MAAM,EAAE,OAAO,MAAM,CAAC;SACvB;KACF;CACF"} | ||||
							
								
								
									
										25
									
								
								node_modules/jest-jasmine2/build/types.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								node_modules/jest-jasmine2/build/types.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,25 @@ | ||||
| 'use strict'; | ||||
|  | ||||
| var _expect = _interopRequireDefault(require('expect')); | ||||
|  | ||||
| var _Spec = _interopRequireDefault(require('./jasmine/Spec')); | ||||
|  | ||||
| var _JsApiReporter = _interopRequireDefault(require('./jasmine/JsApiReporter')); | ||||
|  | ||||
| var _Timer = _interopRequireDefault(require('./jasmine/Timer')); | ||||
|  | ||||
| var _Env = _interopRequireDefault(require('./jasmine/Env')); | ||||
|  | ||||
| var _createSpy = _interopRequireDefault(require('./jasmine/createSpy')); | ||||
|  | ||||
| var _ReportDispatcher = _interopRequireDefault( | ||||
|   require('./jasmine/ReportDispatcher') | ||||
| ); | ||||
|  | ||||
| var _spyRegistry = _interopRequireDefault(require('./jasmine/spyRegistry')); | ||||
|  | ||||
| var _Suite = _interopRequireDefault(require('./jasmine/Suite')); | ||||
|  | ||||
| function _interopRequireDefault(obj) { | ||||
|   return obj && obj.__esModule ? obj : {default: obj}; | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 Shivam Mathur
					Shivam Mathur