Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@amoo-miki/jest-jasmine2

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@amoo-miki/jest-jasmine2 - npm Package Compare versions

Comparing version 27.5.1-rc.2 to 27.5.1-rc.3

3

build/index.js

@@ -84,3 +84,4 @@ 'use strict';

testPath,
testTimeout: globalConfig.testTimeout
testTimeout: globalConfig.testTimeout,
flakyTestRetries: globalConfig.flakyTestRetries
});

@@ -87,0 +88,0 @@ const env = jasmine.getEnv();

@@ -29,3 +29,3 @@ /**

fdescribe: (description: string, specDefinitions: SpecDefinitionsFn) => Suite;
spyOn: (obj: Record<string, Spy>, methodName: string, accessType?: "configurable" | "enumerable" | "value" | "writable" | "get" | "set" | undefined) => Spy;
spyOn: (obj: Record<string, Spy>, methodName: string, accessType?: "get" | "set" | "value" | "writable" | "configurable" | "enumerable" | undefined) => Spy;
beforeEach: (beforeEachFunction: QueueableFn['fn'], timeout?: number | undefined) => void;

@@ -32,0 +32,0 @@ afterEach: (afterEachFunction: QueueableFn['fn'], timeout?: number | undefined) => void;

@@ -361,3 +361,3 @@ 'use strict';

const suiteFactory = function (description) {
const suiteFactory = function (description, flakyTestRetries) {
const suite = new j$.Suite({

@@ -371,3 +371,5 @@ id: getNextSuiteId(),

return j$.testPath;
}
},
flakyTestRetries
});

@@ -377,4 +379,8 @@ return suite;

this.describe = function (description, specDefinitions) {
const suite = suiteFactory(description);
this.describe = function (
description,
specDefinitions,
flakyTestRetries
) {
const suite = suiteFactory(description, flakyTestRetries);

@@ -515,3 +521,4 @@ if (specDefinitions === undefined) {

},
throwOnExpectationFailure
throwOnExpectationFailure,
flakyTestRetries: suite.flakyTestRetries || j$.flakyTestRetries
});

@@ -518,0 +525,0 @@

@@ -64,2 +64,3 @@ 'use strict';

j$._DEFAULT_TIMEOUT_INTERVAL = createOptions.testTimeout || 5000;
j$.flakyTestRetries = createOptions.flakyTestRetries || 0;

@@ -66,0 +67,0 @@ j$.getEnv = function () {

@@ -29,2 +29,3 @@ /**

queueRunnerFactory: typeof queueRunner;
flakyTestRetries: number;
};

@@ -67,3 +68,4 @@ export declare type SpecResult = {

expand?: boolean;
timeoutRetriesRemaining: number;
remainingRetriesCount: number;
executionsAttempted: number;
static pendingSpecExceptionMessage: string;

@@ -80,3 +82,3 @@ static isPendingSpecException(e: Error): boolean;

getResult(): SpecResult;
status(enabled?: boolean): "passed" | "failed" | "pending" | "todo" | "disabled";
status(enabled?: boolean): "todo" | "passed" | "failed" | "pending" | "disabled";
isExecutable(): boolean;

@@ -83,0 +85,0 @@ getFullName(): string;

@@ -84,4 +84,6 @@ 'use strict';

_defineProperty(this, 'timeoutRetriesRemaining', 1);
_defineProperty(this, 'remainingRetriesCount', void 0);
_defineProperty(this, 'executionsAttempted', 0);
this.resultCallback = attrs.resultCallback || function () {};

@@ -120,3 +122,4 @@

this.initError = new Error();
this.initError.name = ''; // Without this line v8 stores references to all closures
this.initError.name = '';
this.remainingRetriesCount = attrs.flakyTestRetries; // Without this line v8 stores references to all closures
// in the stack in the Error object. This line stringifies the stack

@@ -171,2 +174,3 @@ // property to allow garbage-collecting objects on the stack

this.executionsAttempted++;
const fns = this.beforeAndAfterFns();

@@ -200,5 +204,8 @@ const allFns = fns.befores.concat(this.queueableFn).concat(fns.afters);

if (hadTimeouts && self.timeoutRetriesRemaining-- > 0) {
if (hadTimeouts && self.remainingRetriesCount-- > 0) {
self.result.passedExpectations = [];
self.result.failedExpectations = [];
self.result.description = `${self.description} [Attempt #${
1 + self.executionsAttempted
}]`;
return self.execute(onComplete, enabled, true);

@@ -205,0 +212,0 @@ }

@@ -26,2 +26,3 @@ /**

getTestPath: () => Config.Path;
flakyTestRetries?: number;
};

@@ -44,2 +45,3 @@ export default class Suite {

isFocused: boolean;
flakyTestRetries?: number;
constructor(attrs: Attributes);

@@ -46,0 +48,0 @@ getFullName(): string;

@@ -68,2 +68,4 @@ 'use strict';

_defineProperty(this, 'flakyTestRetries', void 0);
this.markedPending = false;

@@ -78,2 +80,3 @@ this.markedTodo = false;

this.throwOnExpectationFailure = !!attrs.throwOnExpectationFailure;
this.flakyTestRetries = attrs.flakyTestRetries;
this.beforeFns = [];

@@ -80,0 +83,0 @@ this.afterFns = [];

@@ -61,2 +61,3 @@ /**

DEFAULT_TIMEOUT_INTERVAL: number;
flakyTestRetries: number;
currentEnv_: ReturnType<typeof Env>['prototype'];

@@ -63,0 +64,0 @@ getEnv: () => ReturnType<typeof Env>['prototype'];

{
"name": "@amoo-miki/jest-jasmine2",
"version": "27.5.1-rc.2",
"version": "27.5.1-rc.3",
"repository": {

@@ -5,0 +5,0 @@ "type": "git",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc