Updating NPM dependencies

This commit is contained in:
Drew Heavner
2020-11-11 13:30:52 +00:00
committed by GitHub
parent 7a6fb66c63
commit bd487ef324
9068 changed files with 1400893 additions and 587661 deletions

View File

@@ -6,4 +6,3 @@
*/
export default class ExpectationFailed extends Error {
}
//# sourceMappingURL=ExpectationFailed.d.ts.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"ExpectationFailed.d.ts","sourceRoot":"","sources":["../src/ExpectationFailed.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,KAAK;CAAG"}

17
node_modules/jest-jasmine2/build/PCancelable.d.ts generated vendored Normal file
View 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.
*/
export default class PCancelable<T> extends Promise<T> {
private _pending;
private _canceled;
private _promise;
private _cancel?;
private _reject;
constructor(executor: (onCancel: (cancelHandler: () => void) => void, resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: unknown) => void) => void);
then<TResult1 = T, TResult2 = never>(onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onRejected?: ((reason: unknown) => TResult2 | PromiseLike<TResult2>) | undefined | null): Promise<TResult1 | TResult2>;
catch<TResult>(onRejected?: ((reason: unknown) => TResult | PromiseLike<TResult>) | undefined | null): Promise<T | TResult>;
cancel(): void;
}

View File

@@ -1,15 +1,33 @@
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports.default = void 0;
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 _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.
*/
'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');
@@ -17,20 +35,20 @@ class CancelError extends Error {
}
}
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);
});
};
}
class PCancelable extends Promise {
constructor(executor) {
this._pending = true;
this._canceled = false;
super(resolve => resolve());
_defineProperty(this, '_pending', true);
_defineProperty(this, '_canceled', false);
_defineProperty(this, '_promise', void 0);
_defineProperty(this, '_cancel', void 0);
_defineProperty(this, '_reject', () => {});
this._promise = new Promise((resolve, reject) => {
this._reject = reject;
return executor(
@@ -49,12 +67,12 @@ class PCancelable {
});
}
then() {
return this._promise.then.apply(this._promise, arguments);
then(onFulfilled, onRejected) {
return this._promise.then(onFulfilled, onRejected);
}
catch() {
return this._promise.catch.apply(this._promise, arguments);
catch(onRejected) {
return this._promise.catch(onRejected);
}
cancel() {
@@ -74,12 +92,6 @@ class PCancelable {
this._reject(new CancelError());
}
get canceled() {
return this._canceled;
}
}
Object.setPrototypeOf(PCancelable.prototype, Promise.prototype);
module.exports = PCancelable;
module.exports.CancelError = CancelError;
exports.default = PCancelable;

View File

@@ -5,7 +5,6 @@
* LICENSE file in the root directory of this source tree.
*/
import { DiffOptions } from 'jest-matcher-utils';
import { AssertionErrorWithStack } from './types';
import type { AssertionErrorWithStack } from './types';
declare function assertionErrorMessage(error: AssertionErrorWithStack, options: DiffOptions): string;
export default assertionErrorMessage;
//# sourceMappingURL=assertionErrorMessage.d.ts.map

View File

@@ -1 +0,0 @@
{"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"}

View File

@@ -5,10 +5,10 @@ Object.defineProperty(exports, '__esModule', {
});
exports.default = void 0;
var _jestMatcherUtils = require('jest-matcher-utils');
var _chalk = _interopRequireDefault(require('chalk'));
var _jestMatcherUtils = require('jest-matcher-utils');
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {default: obj};
}
@@ -47,6 +47,10 @@ const getOperatorName = (operator, stack) => {
if (stack.match('.throws')) {
return 'throws';
} // this fallback is only needed for versions older than node 10
if (stack.match('.fail')) {
return 'fail';
}
return '';
@@ -91,12 +95,7 @@ const assertMatcherHint = (operator, operatorName, expected) => {
};
function assertionErrorMessage(error, options) {
const expected = error.expected,
actual = error.actual,
generatedMessage = error.generatedMessage,
message = error.message,
operator = error.operator,
stack = error.stack;
const {expected, actual, generatedMessage, message, operator, stack} = error;
const diffString = (0, _jestMatcherUtils.diff)(expected, actual, options);
const hasCustomMessage = !generatedMessage;
const operatorName = getOperatorName(operator, stack);
@@ -129,6 +128,14 @@ function assertionErrorMessage(error, options) {
);
}
if (operatorName === 'fail') {
return (
buildHintString(assertMatcherHint(operator, operatorName, expected)) +
_chalk.default.reset(hasCustomMessage ? 'Message:\n ' + message : '') +
trimmedStack
);
}
return (
buildHintString(assertMatcherHint(operator, operatorName, expected)) +
_chalk.default.reset(`Expected value ${operatorMessage(operator)}`) +

View File

@@ -4,7 +4,6 @@
* 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';
import type { JestEnvironment } from '@jest/environment';
declare const _default: (environment: JestEnvironment) => void;
export default _default;
//# sourceMappingURL=each.d.ts.map

View File

@@ -1 +0,0 @@
{"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"}

View File

@@ -29,6 +29,18 @@ var _default = environment => {
environment.global.fdescribe,
false
);
environment.global.it.concurrent.each = (0, _jestEach.bind)(
environment.global.it.concurrent,
false
);
environment.global.it.concurrent.only.each = (0, _jestEach.bind)(
environment.global.it.concurrent.only,
false
);
environment.global.it.concurrent.skip.each = (0, _jestEach.bind)(
environment.global.it.concurrent.skip,
false
);
};
exports.default = _default;

View File

@@ -4,6 +4,5 @@
* 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';
import type { Global } from '@jest/types';
export declare function installErrorOnPrivate(global: Global.Global): void;
//# sourceMappingURL=errorOnPrivate.d.ts.map

View File

@@ -1 +0,0 @@
{"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"}

View File

@@ -39,7 +39,7 @@ function installErrorOnPrivate(global) {
};
});
Object.keys(disabledJasmineMethods).forEach(methodName => {
// @ts-ignore
// @ts-expect-error
jasmine[methodName] = () => {
throwAtFunction(disabledJasmineMethods[methodName], jasmine[methodName]);
};

View File

@@ -4,7 +4,7 @@
* 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';
import type { FailedAssertion } from '@jest/test-result';
export declare type Options = {
matcherName: string;
passed: boolean;
@@ -14,4 +14,3 @@ export declare type Options = {
message?: string | null;
};
export default function expectationResultFactory(options: Options, initError?: Error): FailedAssertion;
//# sourceMappingURL=expectationResultFactory.d.ts.map

View File

@@ -1 +0,0 @@
{"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"}

View File

@@ -37,6 +37,10 @@ function messageFormatter({error, message, passed}) {
typeof error.message === 'string' &&
typeof error.name === 'string'
) {
if (error.message === '') {
return error.name;
}
return `${error.name}: ${error.message}`;
}
@@ -51,7 +55,7 @@ function stackFormatter(options, initError, errorMessage) {
}
if (options.error) {
if (options.error.stack) {
if (typeof options.error.stack === 'string') {
return options.error.stack;
}

View File

@@ -4,14 +4,13 @@
* 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';
import type { JestEnvironment } from '@jest/environment';
import type { TestResult } from '@jest/test-result';
import type { Config } from '@jest/types';
import type { RuntimeType as Runtime } from 'jest-runtime';
import type { 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

View File

@@ -1 +0,0 @@
{"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"}

View File

@@ -1,210 +1,238 @@
'use strict';
var _path = _interopRequireDefault(require('path'));
var path = _interopRequireWildcard(require('path'));
var _jestUtil = require('jest-util');
var _sourceMap = require('@jest/source-map');
var _each = _interopRequireDefault(require('./each'));
var _errorOnPrivate = require('./errorOnPrivate');
var _reporter = _interopRequireDefault(require('./reporter'));
var _jasmineAsyncInstall = _interopRequireDefault(
require('./jasmineAsyncInstall')
);
var _reporter = _interopRequireDefault(require('./reporter'));
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 _getRequireWildcardCache() {
if (typeof WeakMap !== 'function') return null;
var cache = new WeakMap();
_getRequireWildcardCache = function () {
return cache;
};
return cache;
}
function _interopRequireWildcard(obj) {
if (obj && obj.__esModule) {
return obj;
}
if (obj === null || (typeof obj !== 'object' && typeof obj !== 'function')) {
return {default: obj};
}
var cache = _getRequireWildcardCache();
if (cache && cache.has(obj)) {
return cache.get(obj);
}
var newObj = {};
var hasPropertyDescriptor =
Object.defineProperty && Object.getOwnPropertyDescriptor;
for (var key in obj) {
if (Object.prototype.hasOwnProperty.call(obj, key)) {
var desc = hasPropertyDescriptor
? Object.getOwnPropertyDescriptor(obj, key)
: null;
if (desc && (desc.get || desc.set)) {
Object.defineProperty(newObj, key, desc);
} else {
newObj[key] = obj[key];
}
}
}
newObj.default = obj;
if (cache) {
cache.set(obj, newObj);
}
return newObj;
}
/**
* 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 JASMINE = require.resolve('./jasmine/jasmineLight');
function jasmine2(_x, _x2, _x3, _x4, _x5) {
return _jasmine.apply(this, arguments);
}
const jestEachBuildDir = path.dirname(require.resolve('jest-each'));
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
async function jasmine2(globalConfig, config, environment, runtime, testPath) {
var _runtime$unstable_sho2;
if (config.testLocationInResults === true) {
const originalIt = environment.global.it;
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();
environment.global.it = (...args) => {
const stack = (0, _jestUtil.getCallsite)(1, runtime.getSourceMaps());
const it = originalIt(...args); // @ts-ignore
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) {
function wrapIt(original) {
const wrapped = (testName, fn, timeout) => {
var _stack$getFileName;
const sourcemaps = runtime.getSourceMaps();
let stack = (0, _sourceMap.getCallsite)(1, sourcemaps);
const it = original(testName, fn, timeout);
if (
(_stack$getFileName = stack.getFileName()) === null ||
_stack$getFileName === void 0
? void 0
: _stack$getFileName.startsWith(jestEachBuildDir)
) {
stack = (0, _sourceMap.getCallsite)(4, sourcemaps);
} // @ts-expect-error
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;
};
return wrapped;
}
(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;
environment.global.it = wrapIt(environment.global.it);
environment.global.xit = wrapIt(environment.global.xit);
environment.global.fit = wrapIt(environment.global.fit);
}
if (config.timers === 'fake') {
environment.fakeTimers.useFakeTimers();
(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' || config.timers === 'legacy') {
environment.fakeTimers.useFakeTimers();
} else if (config.timers === 'modern') {
environment.fakeTimersModern.useFakeTimers();
}
env.beforeEach(() => {
if (config.resetModules) {
runtime.resetModules();
}
env.beforeEach(() => {
if (config.resetModules) {
runtime.resetModules();
if (config.clearMocks) {
runtime.clearAllMocks();
}
if (config.resetMocks) {
runtime.resetAllMocks();
if (config.timers === 'fake' || config.timers === 'legacy') {
environment.fakeTimers.useFakeTimers();
}
}
if (config.clearMocks) {
runtime.clearAllMocks();
}
if (config.restoreMocks) {
runtime.restoreAllMocks();
}
});
env.addReporter(reporter);
runtime
.requireInternalModule(path.resolve(__dirname, './jestExpect.js'))
.default({
expand: globalConfig.expand
});
if (config.resetMocks) {
runtime.resetAllMocks();
if (globalConfig.errorOnDeprecated) {
(0, _errorOnPrivate.installErrorOnPrivate)(environment.global);
} else {
Object.defineProperty(jasmine, 'DEFAULT_TIMEOUT_INTERVAL', {
configurable: true,
enumerable: true,
if (config.timers === 'fake') {
environment.fakeTimers.useFakeTimers();
}
}
get() {
return this._DEFAULT_TIMEOUT_INTERVAL;
},
if (config.restoreMocks) {
runtime.restoreAllMocks();
set(value) {
this._DEFAULT_TIMEOUT_INTERVAL = value;
}
});
env.addReporter(reporter);
runtime
.requireInternalModule(
_path.default.resolve(__dirname, './jestExpect.js')
)
.default({
expand: globalConfig.expand
});
}
if (globalConfig.errorOnDeprecated) {
(0, _errorOnPrivate.installErrorOnPrivate)(environment.global);
const snapshotState = runtime
.requireInternalModule(path.resolve(__dirname, './setup_jest_globals.js'))
.default({
config,
globalConfig,
localRequire: runtime.requireModule.bind(runtime),
testPath
});
for (const path of config.setupFilesAfterEnv) {
var _runtime$unstable_sho;
// TODO: remove ? in Jest 26
const esm =
(_runtime$unstable_sho = runtime.unstable_shouldLoadAsEsm) === null ||
_runtime$unstable_sho === void 0
? void 0
: _runtime$unstable_sho.call(runtime, path);
if (esm) {
await runtime.unstable_importModule(path);
} else {
Object.defineProperty(jasmine, 'DEFAULT_TIMEOUT_INTERVAL', {
configurable: true,
enumerable: true,
get() {
return this._DEFAULT_TIMEOUT_INTERVAL;
},
set(value) {
this._DEFAULT_TIMEOUT_INTERVAL = value;
}
});
runtime.requireModule(path);
}
}
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]) || false;
};
} else if (globalConfig.testNamePattern) {
const testNameRegex = new RegExp(globalConfig.testNamePattern, 'i');
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());
} // TODO: remove ? in Jest 26
env.specFilter = spec => testNameRegex.test(spec.getFullName());
}
const esm =
(_runtime$unstable_sho2 = runtime.unstable_shouldLoadAsEsm) === null ||
_runtime$unstable_sho2 === void 0
? void 0
: _runtime$unstable_sho2.call(runtime, testPath);
if (esm) {
await runtime.unstable_importModule(testPath);
} else {
runtime.requireModule(testPath);
yield env.execute();
const results = yield reporter.getResults();
return addSnapshotData(results, snapshotState);
});
return _jasmine.apply(this, arguments);
}
await env.execute();
const results = await reporter.getResults();
return addSnapshotData(results, snapshotState);
}
const addSnapshotData = (results, snapshotState) => {
@@ -232,6 +260,6 @@ const addSnapshotData = (results, snapshotState) => {
results.snapshot.uncheckedKeys = Array.from(uncheckedKeys);
return results;
}; // eslint-disable-next-line no-redeclare
};
module.exports = jasmine2;

View File

@@ -8,4 +8,3 @@ export default function isError(potentialError: any): {
isError: boolean;
message: string | null;
};
//# sourceMappingURL=isError.d.ts.map

View File

@@ -1 +0,0 @@
{"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"}

View File

@@ -17,7 +17,7 @@ function _interopRequireDefault(obj) {
* 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) {
function isError(potentialError) { // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
// duck-type Error, see #2549
const isError =
potentialError !== null &&

View File

@@ -23,4 +23,3 @@ declare class CallTracker {
constructor();
}
export default CallTracker;
//# sourceMappingURL=CallTracker.d.ts.map

View File

@@ -1 +0,0 @@
{"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"}

View File

@@ -72,28 +72,28 @@ class CallTracker {
let calls = [];
this.track = function(context) {
this.track = function (context) {
calls.push(context);
};
this.any = function() {
this.any = function () {
return !!calls.length;
};
this.count = function() {
this.count = function () {
return calls.length;
};
this.argsFor = function(index) {
this.argsFor = function (index) {
const call = calls[index];
return call ? call.args : [];
};
this.all = function() {
this.all = function () {
return calls;
};
this.allArgs = function() {
this.allArgs = function () {
const callArgs = [];
for (let i = 0; i < calls.length; i++) {
@@ -103,15 +103,15 @@ class CallTracker {
return callArgs;
};
this.first = function() {
this.first = function () {
return calls[0];
};
this.mostRecent = function() {
this.mostRecent = function () {
return calls[calls.length - 1];
};
this.reset = function() {
this.reset = function () {
calls = [];
};
}

View File

@@ -5,11 +5,12 @@
* 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';
import { QueueableFn } from '../queueRunner';
import type { AssertionErrorWithStack, Jasmine, Reporter, SpecDefinitionsFn, Spy } from '../types';
import type { default as Spec } from './Spec';
import type Suite from './Suite';
export default function (j$: Jasmine): {
new (_options?: object | undefined): {
new (_options?: Record<string, unknown> | undefined): {
specFilter: (spec: Spec) => boolean;
catchExceptions: (value: unknown) => boolean;
throwOnExpectationFailure: (value: unknown) => void;
@@ -17,27 +18,26 @@ export default function (j$: Jasmine): {
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;
afterAll: (afterAllFunction: QueueableFn['fn'], timeout?: number | undefined) => void;
fit: (description: string, fn: QueueableFn['fn'], timeout?: number | undefined) => Spec;
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;
execute: (runnablesToRun?: string[] | undefined, suiteTree?: Suite | undefined) => Promise<void>;
fdescribe: (description: string, specDefinitions: SpecDefinitionsFn) => Suite;
spyOn: (obj: Record<string, Spy>, methodName: string, accessType?: "configurable" | "enumerable" | "value" | "writable" | "get" | "set" | undefined) => Spy;
beforeEach: (beforeEachFunction: QueueableFn['fn'], timeout?: number | undefined) => void;
afterEach: (afterEachFunction: QueueableFn['fn'], 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;
it: (description: string, fn: QueueableFn['fn'], timeout?: number | undefined) => Spec;
xdescribe: (description: string, specDefinitions: SpecDefinitionsFn) => Suite;
xit: (description: string, fn: QueueableFn['fn'], timeout?: number | undefined) => Spec;
beforeAll: (beforeAllFunction: QueueableFn['fn'], timeout?: number | undefined) => void;
todo: () => Spec;
provideFallbackReporter: (reporterToAdd: Reporter) => void;
allowRespy: (allow: boolean) => void;
describe: (description: string, specDefinitions: Function) => Suite;
describe: (description: string, specDefinitions: SpecDefinitionsFn) => Suite;
};
};
//# sourceMappingURL=Env.d.ts.map

View File

@@ -1 +0,0 @@
{"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"}

View File

@@ -13,56 +13,20 @@ 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')
);
var _isError = _interopRequireDefault(require('../isError'));
var _queueRunner = _interopRequireDefault(require('../queueRunner'));
var _treeProcessor = _interopRequireDefault(require('../treeProcessor'));
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, {
@@ -152,11 +116,11 @@ function _default(j$) {
let nextSpecId = 0;
let nextSuiteId = 0;
const getNextSpecId = function getNextSpecId() {
const getNextSpecId = function () {
return 'spec' + nextSpecId++;
};
const getNextSuiteId = function getNextSuiteId() {
const getNextSuiteId = function () {
return 'suite' + nextSuiteId++;
};
@@ -170,11 +134,11 @@ function _default(j$) {
});
let currentDeclarationSuite = topSuite;
const currentSuite = function currentSuite() {
const currentSuite = function () {
return currentlyExecutingSuites[currentlyExecutingSuites.length - 1];
};
const currentRunnable = function currentRunnable() {
const currentRunnable = function () {
return currentSpec || currentSuite();
};
@@ -187,29 +151,24 @@ function _default(j$) {
'specDone'
]);
this.specFilter = function() {
this.specFilter = function () {
return true;
};
const defaultResourcesForRunnable = function defaultResourcesForRunnable(
id,
_parentRunnableId
) {
const defaultResourcesForRunnable = function (id, _parentRunnableId) {
const resources = {
spies: []
};
runnableResources[id] = resources;
};
const clearResourcesForRunnable = function clearResourcesForRunnable(
id
) {
const clearResourcesForRunnable = function (id) {
spyRegistry.clearSpies();
delete runnableResources[id];
};
const beforeAndAfterFns = function beforeAndAfterFns(suite) {
return function() {
const beforeAndAfterFns = function (suite) {
return function () {
let afters = [];
let befores = [];
@@ -226,7 +185,7 @@ function _default(j$) {
};
};
const getSpecName = function getSpecName(spec, suite) {
const getSpecName = function (spec, suite) {
const fullName = [spec.description];
const suiteFullName = suite.getFullName();
@@ -237,32 +196,32 @@ function _default(j$) {
return fullName.join(' ');
};
this.catchExceptions = function(value) {
this.catchExceptions = function (value) {
catchExceptions = !!value;
return catchExceptions;
};
this.catchingExceptions = function() {
this.catchingExceptions = function () {
return catchExceptions;
};
this.throwOnExpectationFailure = function(value) {
this.throwOnExpectationFailure = function (value) {
throwOnExpectationFailure = !!value;
};
this.throwingExpectationFailures = function() {
this.throwingExpectationFailures = function () {
return throwOnExpectationFailure;
};
this.randomizeTests = function(value) {
this.randomizeTests = function (value) {
random = !!value;
};
this.randomTests = function() {
this.randomTests = function () {
return random;
};
this.seed = function(value) {
this.seed = function (value) {
if (value) {
seed = value;
}
@@ -277,7 +236,7 @@ function _default(j$) {
return (0, _queueRunner.default)(options);
};
this.topSuite = function() {
this.topSuite = function () {
return topSuite;
};
@@ -294,7 +253,7 @@ function _default(j$) {
let oldListenersException;
let oldListenersRejection;
const executionSetup = function executionSetup() {
const executionSetup = function () {
// Need to ensure we are the only ones handling these exceptions.
oldListenersException = process
.listeners('uncaughtException')
@@ -308,7 +267,7 @@ function _default(j$) {
j$.process.on('unhandledRejection', uncaught);
};
const executionTeardown = function executionTeardown() {
const executionTeardown = function () {
j$.process.removeListener('uncaughtException', uncaught);
j$.process.removeListener('unhandledRejection', uncaught); // restore previous exception handlers
@@ -320,84 +279,73 @@ function _default(j$) {
});
};
this.execute =
/*#__PURE__*/
(function() {
var _ref = _asyncToGenerator(function*(
runnablesToRun,
suiteTree = topSuite
) {
if (!runnablesToRun) {
if (focusedRunnables.length) {
runnablesToRun = focusedRunnables;
} else {
runnablesToRun = [suiteTree.id];
}
this.execute = async function (runnablesToRun, suiteTree = topSuite) {
if (!runnablesToRun) {
if (focusedRunnables.length) {
runnablesToRun = focusedRunnables;
} else {
runnablesToRun = [suiteTree.id];
}
}
if (currentlyExecutingSuites.length === 0) {
executionSetup();
}
const lastDeclarationSuite = currentDeclarationSuite;
await (0, _treeProcessor.default)({
nodeComplete(suite) {
if (!suite.disabled) {
clearResourcesForRunnable(suite.id);
}
if (currentlyExecutingSuites.length === 0) {
executionSetup();
currentlyExecutingSuites.pop();
if (suite === topSuite) {
reporter.jasmineDone({
failedExpectations: topSuite.result.failedExpectations
});
} else {
reporter.suiteDone(suite.getResult());
}
},
const lastDeclarationSuite = currentDeclarationSuite;
yield (0, _treeProcessor.default)({
nodeComplete(suite) {
if (!suite.disabled) {
clearResourcesForRunnable(suite.id);
}
nodeStart(suite) {
currentlyExecutingSuites.push(suite);
defaultResourcesForRunnable(
suite.id,
suite.parentSuite && suite.parentSuite.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();
if (suite === topSuite) {
reporter.jasmineStarted({
totalSpecsDefined
});
} else {
reporter.suiteStarted(suite.result);
}
});
},
return function(_x) {
return _ref.apply(this, arguments);
};
})();
queueRunnerFactory,
runnableIds: runnablesToRun,
tree: suiteTree
});
currentDeclarationSuite = lastDeclarationSuite;
this.addReporter = function(reporterToAdd) {
if (currentlyExecutingSuites.length === 0) {
executionTeardown();
}
};
this.addReporter = function (reporterToAdd) {
reporter.addReporter(reporterToAdd);
};
this.provideFallbackReporter = function(reporterToAdd) {
this.provideFallbackReporter = function (reporterToAdd) {
reporter.provideFallbackReporter(reporterToAdd);
};
this.clearReporters = function() {
this.clearReporters = function () {
reporter.clearReporters();
};
@@ -413,15 +361,15 @@ function _default(j$) {
}
});
this.allowRespy = function(allow) {
this.allowRespy = function (allow) {
spyRegistry.allowRespy(allow);
};
this.spyOn = function(...args) {
this.spyOn = function (...args) {
return spyRegistry.spyOn.apply(spyRegistry, args);
};
const suiteFactory = function suiteFactory(description) {
const suiteFactory = function (description) {
const suite = new j$.Suite({
id: getNextSuiteId(),
description,
@@ -435,7 +383,7 @@ function _default(j$) {
return suite;
};
this.describe = function(description, specDefinitions) {
this.describe = function (description, specDefinitions) {
const suite = suiteFactory(description);
if (specDefinitions === undefined) {
@@ -459,7 +407,7 @@ function _default(j$) {
}
if (currentDeclarationSuite.markedTodo) {
// @ts-ignore TODO Possible error: Suite does not have todo method
// @ts-expect-error TODO Possible error: Suite does not have todo method
suite.todo();
}
@@ -467,7 +415,7 @@ function _default(j$) {
return suite;
};
this.xdescribe = function(description, specDefinitions) {
this.xdescribe = function (description, specDefinitions) {
const suite = suiteFactory(description);
suite.pend();
addSpecsToSuite(suite, specDefinitions);
@@ -476,7 +424,7 @@ function _default(j$) {
const focusedRunnables = [];
this.fdescribe = function(description, specDefinitions) {
this.fdescribe = function (description, specDefinitions) {
const suite = suiteFactory(description);
suite.isFocused = true;
focusedRunnables.push(suite.id);
@@ -490,7 +438,7 @@ function _default(j$) {
parentSuite.addChild(suite);
currentDeclarationSuite = suite;
let declarationError = undefined;
let describeReturnValue = undefined;
let describeReturnValue;
try {
describeReturnValue = specDefinitions.call(suite);
@@ -622,7 +570,7 @@ function _default(j$) {
}
};
this.it = function(description, fn, timeout) {
this.it = function (description, fn, timeout) {
if (typeof description !== 'string') {
throw new Error(
`Invalid first argument, ${description}. It must be a string.`
@@ -655,11 +603,7 @@ function _default(j$) {
if (currentSpec !== null) {
throw new Error(
'Tests cannot be nested. Test `' +
spec.description +
'` cannot run because it is nested within `' +
currentSpec.description +
'`.'
`Tests cannot be nested. Test "${spec.description}" cannot run because it is nested within "${currentSpec.description}".`
);
}
@@ -667,19 +611,19 @@ function _default(j$) {
return spec;
};
this.xit = function(...args) {
this.xit = function (...args) {
const spec = this.it.apply(this, args);
spec.pend('Temporarily disabled with xit');
return spec;
};
this.todo = function() {
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
this.todo
);
}
@@ -693,7 +637,7 @@ function _default(j$) {
return spec;
};
this.fit = function(description, fn, timeout) {
this.fit = function (description, fn, timeout) {
const spec = specFactory(
description,
fn,
@@ -706,7 +650,7 @@ function _default(j$) {
return spec;
};
this.beforeEach = function(beforeEachFunction, timeout) {
this.beforeEach = function (beforeEachFunction, timeout) {
currentDeclarationSuite.beforeEach({
fn: beforeEachFunction,
@@ -716,7 +660,7 @@ function _default(j$) {
});
};
this.beforeAll = function(beforeAllFunction, timeout) {
this.beforeAll = function (beforeAllFunction, timeout) {
currentDeclarationSuite.beforeAll({
fn: beforeAllFunction,
@@ -726,7 +670,7 @@ function _default(j$) {
});
};
this.afterEach = function(afterEachFunction, timeout) {
this.afterEach = function (afterEachFunction, timeout) {
currentDeclarationSuite.afterEach({
fn: afterEachFunction,
@@ -736,7 +680,7 @@ function _default(j$) {
});
};
this.afterAll = function(afterAllFunction, timeout) {
this.afterAll = function (afterAllFunction, timeout) {
currentDeclarationSuite.afterAll({
fn: afterAllFunction,
@@ -746,7 +690,7 @@ function _default(j$) {
});
};
this.pending = function(message) {
this.pending = function (message) {
let fullMessage = j$.Spec.pendingSpecExceptionMessage;
if (message) {
@@ -756,7 +700,7 @@ function _default(j$) {
throw fullMessage;
};
this.fail = function(error) {
this.fail = function (error) {
let checkIsError;
let message;
@@ -764,7 +708,7 @@ function _default(j$) {
error instanceof _assert.AssertionError ||
(error && error.name === _assert.AssertionError.name)
) {
checkIsError = false; // @ts-ignore TODO Possible error: j$.Spec does not have expand property
checkIsError = false; // @ts-expect-error TODO Possible error: j$.Spec does not have expand property
message = (0, _assertionErrorMessage.default)(error, {
expand: j$.Spec.expand

View File

@@ -5,10 +5,10 @@
* 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';
import type { Reporter, RunDetails } from '../types';
import type { SpecResult } from './Spec';
import type { SuiteResult } from './Suite';
import type Timer from './Timer';
export default class JsApiReporter implements Reporter {
started: boolean;
finished: boolean;
@@ -29,4 +29,3 @@ export default class JsApiReporter implements Reporter {
timer?: Timer;
});
}
//# sourceMappingURL=JsApiReporter.d.ts.map

View File

@@ -1 +0,0 @@
{"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"}

View File

@@ -112,7 +112,7 @@ class JsApiReporter {
}
}
this.jasmineDone = function(runDetails) {
this.jasmineDone = function (runDetails) {
validateAfterAllExceptions(runDetails);
this.finished = true;
this.runDetails = runDetails;
@@ -120,24 +120,24 @@ class JsApiReporter {
status = 'done';
};
this.status = function() {
this.status = function () {
return status;
};
const suites = [];
const suites_hash = {};
this.specStarted = function() {};
this.specStarted = function () {};
this.suiteStarted = function(result) {
this.suiteStarted = function (result) {
suites_hash[result.id] = result;
};
this.suiteDone = function(result) {
this.suiteDone = function (result) {
storeSuite(result);
};
this.suiteResults = function(index, length) {
this.suiteResults = function (index, length) {
return suites.slice(index, index + length);
};
@@ -146,25 +146,25 @@ class JsApiReporter {
suites_hash[result.id] = result;
}
this.suites = function() {
this.suites = function () {
return suites_hash;
};
const specs = [];
this.specDone = function(result) {
this.specDone = function (result) {
specs.push(result);
};
this.specResults = function(index, length) {
this.specResults = function (index, length) {
return specs.slice(index, index + length);
};
this.specs = function() {
this.specs = function () {
return specs;
};
this.executionTime = function() {
this.executionTime = function () {
return executionTime;
};
}

View File

@@ -5,9 +5,9 @@
* LICENSE file in the root directory of this source tree.
*
*/
import { Reporter, RunDetails } from '../types';
import { SpecResult } from './Spec';
import { SuiteResult } from './Suite';
import type { Reporter, RunDetails } from '../types';
import type { SpecResult } from './Spec';
import type { SuiteResult } from './Suite';
export default class ReportDispatcher implements Reporter {
addReporter: (reporter: Reporter) => void;
provideFallbackReporter: (reporter: Reporter) => void;
@@ -20,4 +20,3 @@ export default class ReportDispatcher implements Reporter {
suiteStarted: (result: SuiteResult) => void;
constructor(methods: Array<keyof Reporter>);
}
//# sourceMappingURL=ReportDispatcher.d.ts.map

View File

@@ -1 +0,0 @@
{"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"}

View File

@@ -50,13 +50,15 @@ 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 local/prefer-spread-eventually, local/prefer-rest-params-eventually */
class ReportDispatcher {
// @ts-ignore
// @ts-ignore
// @ts-ignore
// @ts-ignore
// @ts-ignore
// @ts-ignore
// @ts-expect-error
// @ts-expect-error
// @ts-expect-error
// @ts-expect-error
// @ts-expect-error
// @ts-expect-error
constructor(methods) {
_defineProperty(this, 'addReporter', void 0);
@@ -81,8 +83,8 @@ class ReportDispatcher {
for (let i = 0; i < dispatchedMethods.length; i++) {
const method = dispatchedMethods[i];
this[method] = (function(m) {
return function() {
this[method] = (function (m) {
return function () {
dispatch(m, arguments);
};
})(method);
@@ -91,15 +93,15 @@ class ReportDispatcher {
let reporters = [];
let fallbackReporter = null;
this.addReporter = function(reporter) {
this.addReporter = function (reporter) {
reporters.push(reporter);
};
this.provideFallbackReporter = function(reporter) {
this.provideFallbackReporter = function (reporter) {
fallbackReporter = reporter;
};
this.clearReporters = function() {
this.clearReporters = function () {
reporters = [];
};
@@ -114,7 +116,7 @@ class ReportDispatcher {
const reporter = reporters[i];
if (reporter[method]) {
// @ts-ignore
// @ts-expect-error
reporter[method].apply(reporter, args);
}
}

View File

@@ -5,12 +5,12 @@
* LICENSE file in the root directory of this source tree.
*
*/
import { Config } from '@jest/types';
import { FailedAssertion, Milliseconds, Status } from '@jest/test-result';
import type { FailedAssertion, Milliseconds, Status } from '@jest/test-result';
import type { Config } from '@jest/types';
import ExpectationFailed from '../ExpectationFailed';
import expectationResultFactory, { Options as ExpectationResultFactoryOptions } from '../expectationResultFactory';
import queueRunner, { QueueableFn } from '../queueRunner';
import { AssertionErrorWithStack } from '../types';
import type { QueueableFn, default as queueRunner } from '../queueRunner';
import type { AssertionErrorWithStack } from '../types';
export declare type Attributes = {
id: string;
resultCallback: (result: Spec['result']) => void;
@@ -67,16 +67,15 @@ export default class Spec {
static isPendingSpecException(e: Error): boolean;
constructor(attrs: Attributes);
addExpectationResult(passed: boolean, data: ExpectationResultFactoryOptions, isError?: boolean): void;
execute(onComplete: Function, enabled: boolean): void;
execute(onComplete?: () => void, 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";
status(enabled?: boolean): "todo" | "passed" | "failed" | "pending" | "disabled";
isExecutable(): boolean;
getFullName(): string;
isAssertionError(error: Error): boolean;
}
//# sourceMappingURL=Spec.d.ts.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"Spec.d.ts","sourceRoot":"","sources":["../../src/jasmine/Spec.ts"],"names":[],"mappings":"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"}

View File

@@ -11,14 +11,14 @@ var _ExpectationFailed = _interopRequireDefault(
require('../ExpectationFailed')
);
var _expectationResultFactory = _interopRequireDefault(
require('../expectationResultFactory')
);
var _assertionErrorMessage = _interopRequireDefault(
require('../assertionErrorMessage')
);
var _expectationResultFactory = _interopRequireDefault(
require('../expectationResultFactory')
);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {default: obj};
}
@@ -81,7 +81,7 @@ class Spec {
_defineProperty(this, 'expand', void 0);
this.resultCallback = attrs.resultCallback || function() {};
this.resultCallback = attrs.resultCallback || function () {};
this.id = attrs.id;
this.description = attrs.description || '';
@@ -89,7 +89,7 @@ class Spec {
this.beforeAndAfterFns =
attrs.beforeAndAfterFns ||
function() {
function () {
return {
befores: [],
afters: []
@@ -98,19 +98,19 @@ class Spec {
this.userContext =
attrs.userContext ||
function() {
function () {
return {};
};
this.onStart = attrs.onStart || function() {};
this.onStart = attrs.onStart || function () {};
this.getSpecName =
attrs.getSpecName ||
function() {
function () {
return '';
};
this.queueRunnerFactory = attrs.queueRunnerFactory || function() {};
this.queueRunnerFactory = attrs.queueRunnerFactory || function () {};
this.throwOnExpectationFailure = !!attrs.throwOnExpectationFailure;
this.initError = new Error();
@@ -120,7 +120,7 @@ class Spec {
// https://crbug.com/v8/7142
this.initError.stack = this.initError.stack;
this.queueableFn.initError = this.initError; // @ts-ignore
this.queueableFn.initError = this.initError; // @ts-expect-error
this.result = {
id: this.id,
@@ -170,7 +170,7 @@ class Spec {
queueableFns: allFns,
onException() {
// @ts-ignore
// @ts-expect-error
self.onException.apply(self, arguments);
},
@@ -287,7 +287,7 @@ _defineProperty(Spec, 'pendingSpecExceptionMessage', void 0);
Spec.pendingSpecExceptionMessage = '=> marked Pending';
const extractCustomPendingMessage = function extractCustomPendingMessage(e) {
const extractCustomPendingMessage = function (e) {
const fullMessage = e.toString();
const boilerplateStart = fullMessage.indexOf(
Spec.pendingSpecExceptionMessage

View File

@@ -20,4 +20,3 @@ export default class SpyStrategy {
getSpy?: () => unknown;
});
}
//# sourceMappingURL=SpyStrategy.d.ts.map

View File

@@ -1 +0,0 @@
{"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"}

View File

@@ -50,11 +50,13 @@ 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 local/ban-types-eventually, local/prefer-rest-params-eventually */
class SpyStrategy {
constructor({
name = 'unknown',
fn = function() {},
getSpy = function() {}
fn = function () {},
getSpy = function () {}
} = {}) {
_defineProperty(this, 'identity', void 0);
@@ -75,51 +77,51 @@ class SpyStrategy {
const identity = name;
const originalFn = fn;
let plan = function plan() {};
let plan = function () {};
this.identity = function() {
this.identity = function () {
return identity;
};
this.exec = function() {
this.exec = function () {
return plan.apply(this, arguments);
};
this.callThrough = function() {
this.callThrough = function () {
plan = originalFn;
return getSpy();
};
this.returnValue = function(value) {
plan = function plan() {
this.returnValue = function (value) {
plan = function () {
return value;
};
return getSpy();
};
this.returnValues = function() {
this.returnValues = function () {
const values = Array.prototype.slice.call(arguments);
plan = function plan() {
plan = function () {
return values.shift();
};
return getSpy();
};
this.throwError = function(something) {
this.throwError = function (something) {
const error =
something instanceof Error ? something : new Error(something);
plan = function plan() {
plan = function () {
throw error;
};
return getSpy();
};
this.callFake = function(fn) {
this.callFake = function (fn) {
if (typeof fn !== 'function') {
throw new Error(
'Argument passed to callFake should be a function, got ' + fn
@@ -130,8 +132,8 @@ class SpyStrategy {
return getSpy();
};
this.stub = function(_fn) {
plan = function plan() {};
this.stub = function (_fn) {
plan = function () {};
return getSpy();
};

View File

@@ -5,10 +5,10 @@
* LICENSE file in the root directory of this source tree.
*
*/
import { Config } from '@jest/types';
import type { Config } from '@jest/types';
import expectationResultFactory from '../expectationResultFactory';
import { QueueableFn } from '../queueRunner';
import Spec from './Spec';
import type { QueueableFn } from '../queueRunner';
import type Spec from './Spec';
export declare type SuiteResult = {
id: string;
description: string;
@@ -49,7 +49,7 @@ export default class Suite {
afterEach(fn: QueueableFn): void;
afterAll(fn: QueueableFn): void;
addChild(child: Suite | Spec): void;
status(): "disabled" | "pending" | "failed" | "finished";
status(): "failed" | "pending" | "disabled" | "finished";
isExecutable(): boolean;
canBeReentered(): boolean;
getResult(): SuiteResult;
@@ -59,4 +59,3 @@ export default class Suite {
addExpectationResult(...args: Parameters<Spec['addExpectationResult']>): void;
execute(..._args: Array<any>): void;
}
//# sourceMappingURL=Suite.d.ts.map

View File

@@ -1 +0,0 @@
{"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"}

View File

@@ -214,7 +214,7 @@ class Suite {
try {
child.addExpectationResult.apply(child, args);
} catch (e) {
} catch {
// keep going
}
}

View File

@@ -12,4 +12,3 @@ export default class Timer {
now?: () => number;
});
}
//# sourceMappingURL=Timer.d.ts.map

View File

@@ -1 +0,0 @@
{"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"}

View File

@@ -50,8 +50,8 @@ 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() {
const defaultNow = (function (Date) {
return function () {
return new Date().getTime();
};
})(Date);
@@ -66,11 +66,11 @@ class Timer {
const now = options.now || defaultNow;
let startTime;
this.start = function() {
this.start = function () {
startTime = now();
};
this.elapsed = function() {
this.elapsed = function () {
return now() - startTime;
};
}

View File

@@ -5,10 +5,9 @@
* LICENSE file in the root directory of this source tree.
*
*/
import { Spy } from '../types';
interface Fn extends Record<string, any> {
(): any;
import type { Spy } from '../types';
interface Fn extends Record<string, unknown> {
(): unknown;
}
declare function createSpy(name: string, originalFn: Fn): Spy;
export default createSpy;
//# sourceMappingURL=createSpy.d.ts.map

View File

@@ -1 +0,0 @@
{"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"}

View File

@@ -45,7 +45,7 @@ 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 */
/* eslint-disable sort-keys, local/prefer-rest-params-eventually */
function createSpy(name, originalFn) {
const spyStrategy = new _SpyStrategy.default({
name,
@@ -57,7 +57,7 @@ function createSpy(name, originalFn) {
});
const callTracker = new _CallTracker.default();
const spy = function spy(...args) {
const spy = function (...args) {
const callData = {
object: this,
args: Array.prototype.slice.apply(arguments)

View File

@@ -5,27 +5,23 @@
* LICENSE file in the root directory of this source tree.
*
*/
import { Jasmine } from '../types';
import type { Jasmine, SpecDefinitionsFn } 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 declare const create: (createOptions: Record<string, any>) => Jasmine;
export declare const _interface: (jasmine: Jasmine, env: any) => {
describe(description: string, specDefinitions: SpecDefinitionsFn): any;
xdescribe(description: string, specDefinitions: SpecDefinitionsFn): any;
fdescribe(description: string, specDefinitions: SpecDefinitionsFn): 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

View File

@@ -1 +0,0 @@
{"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"}

View File

@@ -1,6 +1,9 @@
'use strict';
var _createSpy = _interopRequireDefault(require('./createSpy'));
Object.defineProperty(exports, '__esModule', {
value: true
});
exports._interface = exports.create = void 0;
var _Env = _interopRequireDefault(require('./Env'));
@@ -10,54 +13,56 @@ 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'));
var _createSpy = _interopRequireDefault(require('./createSpy'));
var _spyRegistry = _interopRequireDefault(require('./spyRegistry'));
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;
}
/**
* 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:
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.
const create = function create(createOptions) {
const j$ = _objectSpread({}, createOptions);
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, local/prefer-spread-eventually, local/prefer-rest-params-eventually */
const create = function (createOptions) {
const j$ = {...createOptions};
j$._DEFAULT_TIMEOUT_INTERVAL = createOptions.testTimeout || 5000;
j$.getEnv = function(options) {
j$.getEnv = function (options) {
const env = (j$.currentEnv_ = j$.currentEnv_ || new j$.Env(options)); //jasmine. singletons in here (setTimeout blah blah).
return env;
@@ -73,9 +78,11 @@ const create = function create(createOptions) {
j$.Timer = _Timer.default;
j$.version = '2.5.2-light';
return j$;
};
}; // Interface is a reserved word in strict mode, so can't export it as ESM
const _interface = function _interface(jasmine, env) {
exports.create = create;
const _interface = function (jasmine, env) {
const jasmineInterface = {
describe(description, specDefinitions) {
return env.describe(description, specDefinitions);
@@ -159,9 +166,6 @@ const _interface = function _interface(jasmine, env) {
jasmine
};
return jasmineInterface;
}; // Interface is a reserved word in strict mode, so can't export it as ESM
module.exports = {
create,
interface: _interface
};
exports._interface = _interface;

View File

@@ -5,10 +5,10 @@
* LICENSE file in the root directory of this source tree.
*
*/
import { Spy } from '../types';
import type { Spy } from '../types';
export default class SpyRegistry {
allowRespy: (allow: unknown) => void;
spyOn: (obj: Record<string, any>, methodName: string, accessType?: keyof PropertyDescriptor) => Spy;
spyOn: (obj: Record<string, Spy>, methodName: string, accessType?: keyof PropertyDescriptor) => Spy;
clearSpies: () => void;
respy: unknown;
private _spyOnProperty;
@@ -16,4 +16,3 @@ export default class SpyRegistry {
currentSpies?: () => Array<Spy>;
});
}
//# sourceMappingURL=spyRegistry.d.ts.map

View File

@@ -1 +0,0 @@
{"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"}

View File

@@ -7,32 +7,14 @@ exports.default = void 0;
var _CallTracker = _interopRequireDefault(require('./CallTracker'));
var _createSpy = _interopRequireDefault(require('./createSpy'));
var _SpyStrategy = _interopRequireDefault(require('./SpyStrategy'));
var _createSpy = _interopRequireDefault(require('./createSpy'));
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, {
@@ -77,7 +59,7 @@ class SpyRegistry {
_defineProperty(this, '_spyOnProperty', void 0);
this.allowRespy = function(allow) {
this.allowRespy = function (allow) {
this.respy = allow;
};
@@ -116,7 +98,7 @@ class SpyRegistry {
try {
descriptor = Object.getOwnPropertyDescriptor(obj, methodName);
} catch (e) {
} catch {
// IE 8 doesn't support `definePropery` on non-DOM nodes
}
@@ -131,11 +113,11 @@ class SpyRegistry {
let restoreStrategy;
if (Object.prototype.hasOwnProperty.call(obj, methodName)) {
restoreStrategy = function restoreStrategy() {
restoreStrategy = function () {
obj[methodName] = originalMethod;
};
} else {
restoreStrategy = function restoreStrategy() {
restoreStrategy = function () {
if (!delete obj[methodName]) {
obj[methodName] = originalMethod;
}
@@ -149,7 +131,7 @@ class SpyRegistry {
return spiedMethod;
};
this._spyOnProperty = function(obj, propertyName, accessType = 'get') {
this._spyOnProperty = function (obj, propertyName, accessType = 'get') {
if (!obj) {
throw new Error(
getErrorMsg(
@@ -166,7 +148,7 @@ class SpyRegistry {
try {
descriptor = Object.getOwnPropertyDescriptor(obj, propertyName);
} catch (e) {
} catch {
// IE 8 doesn't support `definePropery` on non-DOM nodes
}
@@ -209,11 +191,11 @@ class SpyRegistry {
let restoreStrategy;
if (Object.prototype.hasOwnProperty.call(obj, propertyName)) {
restoreStrategy = function restoreStrategy() {
restoreStrategy = function () {
Object.defineProperty(obj, propertyName, originalDescriptor);
};
} else {
restoreStrategy = function restoreStrategy() {
restoreStrategy = function () {
delete obj[propertyName];
};
}
@@ -221,16 +203,12 @@ class SpyRegistry {
currentSpies().push({
restoreObjectToOriginalState: restoreStrategy
});
const spiedDescriptor = _objectSpread({}, descriptor, {
[accessType]: spiedProperty
});
const spiedDescriptor = {...descriptor, [accessType]: spiedProperty};
Object.defineProperty(obj, propertyName, spiedDescriptor);
return spiedProperty;
};
this.clearSpies = function() {
this.clearSpies = function () {
const spies = currentSpies();
for (let i = spies.length - 1; i >= 0; i--) {

View File

@@ -4,10 +4,5 @@
* 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';
import type { Config, Global } from '@jest/types';
export default function jasmineAsyncInstall(globalConfig: Config.GlobalConfig, global: Global.Global): void;
//# sourceMappingURL=jasmineAsyncInstall.d.ts.map

View File

@@ -1 +0,0 @@
{"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"}

View File

@@ -11,7 +11,7 @@ var _isGeneratorFn = _interopRequireDefault(require('is-generator-fn'));
var _throat = _interopRequireDefault(require('throat'));
var _isError3 = _interopRequireDefault(require('./isError'));
var _isError = _interopRequireDefault(require('./isError'));
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {default: obj};
@@ -25,9 +25,14 @@ function isPromise(obj) {
return obj && typeof obj.then === 'function';
}
const doneFnNoop = () => {};
doneFnNoop.fail = () => {};
function promisifyLifeCycleFunction(originalFn, env) {
return function(fn, timeout) {
return function (fn, timeout) {
if (!fn) {
// @ts-expect-error: missing fn arg is handled by originalFn
return originalFn.call(env);
}
@@ -46,17 +51,15 @@ function promisifyLifeCycleFunction(originalFn, env) {
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 asyncJestLifecycle = function (done) {
const wrappedFn = (0, _isGeneratorFn.default)(fn)
? _co.default.wrap(fn)
: fn;
const returnValue = wrappedFn.call({});
const returnValue = wrappedFn.call({}, doneFnNoop);
if (isPromise(returnValue)) {
returnValue.then(done.bind(null, null), error => {
const _isError = (0, _isError3.default)(error),
checkIsError = _isError.isError,
message = _isError.message;
const {isError: checkIsError, message} = (0, _isError.default)(error);
if (message) {
extraError.message = message;
@@ -75,8 +78,9 @@ function promisifyLifeCycleFunction(originalFn, env) {
// when the return value is neither a Promise nor `undefined`
function promisifyIt(originalFn, env, jasmine) {
return function(specName, fn, timeout) {
return function (specName, fn, timeout) {
if (!fn) {
// @ts-expect-error: missing fn arg is handled by originalFn
const spec = originalFn.call(env, specName);
spec.pend('not implemented');
return spec;
@@ -95,17 +99,15 @@ function promisifyIt(originalFn, env, jasmine) {
extraError.stack = extraError.stack;
const asyncJestTest = function asyncJestTest(done) {
const asyncJestTest = function (done) {
const wrappedFn = (0, _isGeneratorFn.default)(fn)
? _co.default.wrap(fn)
: fn;
const returnValue = wrappedFn.call({});
const returnValue = wrappedFn.call({}, doneFnNoop);
if (isPromise(returnValue)) {
returnValue.then(done.bind(null, null), error => {
const _isError2 = (0, _isError3.default)(error),
checkIsError = _isError2.isError,
message = _isError2.message;
const {isError: checkIsError, message} = (0, _isError.default)(error);
if (message) {
extraError.message = message;
@@ -134,17 +136,13 @@ function promisifyIt(originalFn, env, jasmine) {
}
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);
}
const concurrentFn = function (specName, fn, timeout) {
let promise = Promise.resolve();
const spec = originalFn.call(env, specName, () => promise, timeout);
let promise;
if (env != null && !env.specFilter(spec)) {
return spec;
}
try {
promise = mutex(() => {
@@ -155,15 +153,19 @@ function makeConcurrent(originalFn, env, mutex) {
}
throw new Error(
`Jest: concurrent test "${specName}" must return a Promise.`
`Jest: concurrent test "${spec.getFullName()}" must return a Promise.`
);
});
} catch (error) {
return originalFn.call(env, specName, () => Promise.reject(error));
promise = Promise.reject(error);
}
return originalFn.call(env, specName, () => promise, timeout);
};
return spec;
}; // each is binded after the function is made concurrent, so for now it is made noop
concurrentFn.each = () => () => {};
return concurrentFn;
}
function jasmineAsyncInstall(globalConfig, global) {

View File

@@ -8,4 +8,3 @@ declare const _default: (config: {
expand: boolean;
}) => void;
export default _default;
//# sourceMappingURL=jestExpect.d.ts.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"jestExpect.d.ts","sourceRoot":"","sources":["../src/jestExpect.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;;;AAuBH,wBA+CE"}

View File

@@ -19,6 +19,8 @@ function _interopRequireDefault(obj) {
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/* eslint-disable local/prefer-spread-eventually */
var _default = config => {
global.expect = _expect.default;
@@ -45,18 +47,18 @@ var _default = config => {
jasmine.addMatchers = jasmineMatchersObject => {
const jestMatchersObject = Object.create(null);
Object.keys(jasmineMatchersObject).forEach(name => {
jestMatchersObject[name] = function(...args) {
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
null, // @ts-expect-error
args
)
: result.compare.apply(
null, // @ts-ignore
null, // @ts-expect-error
args
);
};

View File

@@ -4,5 +4,4 @@
* 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
export default function pTimeout(promise: Promise<void>, ms: number, clearTimeout: NodeJS.Global['clearTimeout'], setTimeout: NodeJS.Global['setTimeout'], onTimeout: () => void): Promise<void>;

View File

@@ -1 +0,0 @@
{"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"}

View File

@@ -11,17 +11,20 @@ export declare type Options = {
onException: (error: Error) => void;
queueableFns: Array<QueueableFn>;
setTimeout: Global['setTimeout'];
userContext: any;
userContext: unknown;
};
export interface DoneFn {
(error?: any): void;
fail: (error: Error) => void;
}
export declare type QueueableFn = {
fn: (done: (error?: any) => void) => void;
fn: (done: DoneFn) => 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>;
declare type PromiseCallback = (() => void | PromiseLike<void>) | undefined | null;
export default function queueRunner(options: Options): PromiseLike<void> & {
cancel: () => void;
catch: (onRejected?: PromiseCallback) => Promise<void>;
};
export {};
//# sourceMappingURL=queueRunner.d.ts.map

View File

@@ -1 +0,0 @@
{"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"}

View File

@@ -5,6 +5,8 @@ Object.defineProperty(exports, '__esModule', {
});
exports.default = queueRunner;
var _jestUtil = require('jest-util');
var _PCancelable = _interopRequireDefault(require('./PCancelable'));
var _pTimeout = _interopRequireDefault(require('./pTimeout'));
@@ -24,7 +26,7 @@ function queueRunner(options) {
const mapper = ({fn, timeout, initError = new Error()}) => {
let promise = new Promise(resolve => {
const next = function next(...args) {
const next = function (...args) {
const err = args[0];
if (err) {
@@ -34,7 +36,7 @@ function queueRunner(options) {
resolve();
};
next.fail = function(...args) {
next.fail = function (...args) {
options.fail.apply(null, args);
resolve();
};
@@ -61,8 +63,8 @@ function queueRunner(options) {
() => {
initError.message =
'Timeout - Async callback was not invoked within the ' +
timeoutMs +
'ms timeout specified by jest.setTimeout.';
(0, _jestUtil.formatTime)(timeoutMs) +
' timeout specified by jest.setTimeout.';
initError.stack = initError.message + initError.stack;
options.onException(initError);
}

View File

@@ -4,11 +4,11 @@
* 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';
import type { Config } from '@jest/types';
import type { SpecResult } from './jasmine/Spec';
import type { SuiteResult } from './jasmine/Suite';
import type { Reporter, RunDetails } from './types';
export default class Jasmine2Reporter implements Reporter {
private _testResults;
private _globalConfig;
@@ -29,4 +29,3 @@ export default class Jasmine2Reporter implements Reporter {
private _addMissingMessageToStack;
private _extractSpecResults;
}
//# sourceMappingURL=reporter.d.ts.map

View File

@@ -1 +0,0 @@
{"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"}

View File

@@ -5,6 +5,8 @@ Object.defineProperty(exports, '__esModule', {
});
exports.default = void 0;
var _testResult = require('@jest/test-result');
var _jestMessageUtil = require('jest-message-util');
var Symbol = global['jest-symbol-do-not-touch'] || global.Symbol;
@@ -93,6 +95,7 @@ class Jasmine2Reporter {
}
});
const testResult = {
...(0, _testResult.createEmptyTestResult)(),
console: null,
failureMessage: (0, _jestMessageUtil.formatResultsErrors)(
testResults,
@@ -104,10 +107,6 @@ class Jasmine2Reporter {
numPassingTests,
numPendingTests,
numTodoTests,
perfStats: {
end: 0,
start: 0
},
snapshot: {
added: 0,
fileDeleted: false,
@@ -154,6 +153,7 @@ class Jasmine2Reporter {
const results = {
ancestorTitles,
duration,
failureDetails: [],
failureMessages: [],
fullName: specResult.fullName,
location,
@@ -164,10 +164,11 @@ class Jasmine2Reporter {
};
specResult.failedExpectations.forEach(failed => {
const message =
!failed.matcherName && failed.stack
!failed.matcherName && typeof failed.stack === 'string'
? this._addMissingMessageToStack(failed.stack, failed.message)
: failed.message || '';
results.failureMessages.push(message);
results.failureDetails.push(failed);
});
return results;
}

View File

@@ -4,14 +4,14 @@
* 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';
import type { Config } from '@jest/types';
import { SnapshotStateType } from 'jest-snapshot';
import type { 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;
declare const _default: ({ config, globalConfig, localRequire, testPath, }: SetupOptions) => SnapshotStateType;
export default _default;
//# sourceMappingURL=setup_jest_globals.d.ts.map

View File

@@ -1 +0,0 @@
{"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"}

View File

@@ -19,9 +19,7 @@ var _jestSnapshot = require('jest-snapshot');
// 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;
const {suppressedErrors} = (0, _expect.getState)();
(0, _expect.setState)({
suppressedErrors: []
});
@@ -62,7 +60,7 @@ const patchJasmine = () => {
constructor(attr) {
const resultCallback = attr.resultCallback;
attr.resultCallback = function(result) {
attr.resultCallback = function (result) {
addSuppressedErrors(result);
addAssertionErrors(result);
resultCallback.call(attr, result);
@@ -95,8 +93,7 @@ var _default = ({config, globalConfig, localRequire, testPath}) => {
(0, _jestSnapshot.addSerializer)(localRequire(path));
});
patchJasmine();
const expand = globalConfig.expand,
updateSnapshot = globalConfig.updateSnapshot;
const {expand, updateSnapshot} = globalConfig;
const snapshotResolver = (0, _jestSnapshot.buildSnapshotResolver)(config);
const snapshotPath = snapshotResolver.resolveSnapshotPath(testPath);
const snapshotState = new _jestSnapshot.SnapshotState(snapshotPath, {
@@ -105,7 +102,8 @@ var _default = ({config, globalConfig, localRequire, testPath}) => {
getPrettier: () =>
config.prettierPath ? require(config.prettierPath) : null,
updateSnapshot
});
}); // @ts-expect-error: snapshotState is a jest extension of `expect`
(0, _expect.setState)({
snapshotState,
testPath

View File

@@ -4,7 +4,7 @@
* 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';
import type Suite from './jasmine/Suite';
declare type Options = {
nodeComplete: (suite: TreeNode) => void;
nodeStart: (suite: TreeNode) => void;
@@ -13,15 +13,14 @@ declare type Options = {
tree: TreeNode;
};
export declare type TreeNode = {
afterAllFns: Array<any>;
beforeAllFns: Array<any>;
afterAllFns: Array<unknown>;
beforeAllFns: Array<unknown>;
disabled?: boolean;
execute: (onComplete: () => void, enabled: boolean) => void;
id: string;
onException: (error: Error) => void;
sharedUserContext: () => any;
sharedUserContext: () => unknown;
children?: Array<TreeNode>;
} & Pick<Suite, 'getResult' | 'parentSuite' | 'result'>;
} & Pick<Suite, 'getResult' | 'parentSuite' | 'result' | 'markedPending'>;
export default function treeProcessor(options: Options): void;
export {};
//# sourceMappingURL=treeProcessor.d.ts.map

View File

@@ -1 +0,0 @@
{"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"}

View File

@@ -4,41 +4,6 @@ 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.
@@ -47,11 +12,13 @@ function _asyncToGenerator(fn) {
* 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;
const {
nodeComplete,
nodeStart,
queueRunnerFactory,
runnableIds,
tree
} = options;
function isEnabled(node, parentEnabled) {
return parentEnabled || runnableIds.indexOf(node.id) !== -1;
@@ -71,35 +38,24 @@ function treeProcessor(options) {
}
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;
})()
);
return async function fn(done = () => {}) {
nodeStart(node);
await queueRunnerFactory({
onException: error => node.onException(error),
queueableFns: wrapChildren(node, enabled),
userContext: node.sharedUserContext()
});
nodeComplete(node);
done();
};
}
function hasEnabledTest(node) {
function hasNoEnabledTest(node) {
if (node.children) {
return node.children.some(hasEnabledTest);
return node.children.every(hasNoEnabledTest);
}
return !node.disabled;
return node.disabled || node.markedPending;
}
function wrapChildren(node, enabled) {
@@ -111,7 +67,7 @@ function treeProcessor(options) {
fn: getNodeHandler(child, enabled)
}));
if (!hasEnabledTest(node)) {
if (hasNoEnabledTest(node)) {
return children;
}

View File

@@ -5,19 +5,20 @@
* 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';
import type { AssertionError } from 'assert';
import type { Config } from '@jest/types';
import expect = require('expect');
import type CallTracker from './jasmine/CallTracker';
import type Env from './jasmine/Env';
import type JsApiReporter from './jasmine/JsApiReporter';
import type ReportDispatcher from './jasmine/ReportDispatcher';
import type { default as Spec, SpecResult } from './jasmine/Spec';
import type SpyStrategy from './jasmine/SpyStrategy';
import type { default as Suite, SuiteResult } from './jasmine/Suite';
import type Timer from './jasmine/Timer';
import type createSpy from './jasmine/createSpy';
import type SpyRegistry from './jasmine/spyRegistry';
export declare type SpecDefinitionsFn = () => void;
export interface AssertionErrorWithStack extends AssertionError {
stack: string;
}
@@ -27,7 +28,7 @@ export declare type SyncExpectationResult = {
};
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 RawMatcherFn = (expected: unknown, actual: unknown, options?: unknown) => ExpectationResult;
export declare type RunDetails = {
totalSpecsDefined?: number;
failedExpectations?: SuiteResult['failedExpectations'];
@@ -46,11 +47,19 @@ export interface Spy extends Record<string, any> {
calls: CallTracker;
restoreObjectToOriginalState?: () => void;
}
declare type JasmineMatcher = {
(matchersUtil: unknown, context: unknown): JasmineMatcher;
compare: () => RawMatcherFn;
negativeCompare: () => RawMatcherFn;
};
export declare type JasmineMatchersObject = {
[id: string]: JasmineMatcher;
};
export declare type Jasmine = {
_DEFAULT_TIMEOUT_INTERVAL: number;
DEFAULT_TIMEOUT_INTERVAL: number;
currentEnv_: ReturnType<typeof Env>['prototype'];
getEnv: (options?: object) => ReturnType<typeof Env>['prototype'];
getEnv: (options?: Record<string, unknown>) => ReturnType<typeof Env>['prototype'];
createSpy: typeof createSpy;
Env: ReturnType<typeof Env>;
JsApiReporter: typeof JsApiReporter;
@@ -61,7 +70,7 @@ export declare type Jasmine = {
Timer: typeof Timer;
version: string;
testPath: Config.Path;
addMatchers: Function;
addMatchers: (matchers: JasmineMatchersObject) => void;
} & typeof expect & NodeJS.Global;
declare global {
module NodeJS {
@@ -70,4 +79,4 @@ declare global {
}
}
}
//# sourceMappingURL=types.d.ts.map
export {};

View File

@@ -1 +0,0 @@
{"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"}

View File

@@ -2,24 +2,6 @@
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};
}