jest-jasmine2
Advanced tools
Comparing version 28.1.0 to 28.1.1
@@ -42,3 +42,3 @@ 'use strict'; | ||
Object.keys(disabledJasmineMethods).forEach(methodName => { | ||
// @ts-expect-error | ||
// @ts-expect-error - void unallowd, but it throws 🤷 | ||
jasmine[methodName] = () => { | ||
@@ -45,0 +45,0 @@ throwAtFunction(disabledJasmineMethods[methodName], jasmine[methodName]); |
@@ -131,10 +131,7 @@ /** | ||
pending: (message: string) => void; | ||
afterAll: ( | ||
afterAllFunction: QueueableFn['fn'], | ||
timeout?: number | undefined, | ||
) => void; | ||
afterAll: (afterAllFunction: QueueableFn['fn'], timeout?: number) => void; | ||
fit: ( | ||
description: Circus.TestNameLike, | ||
fn: QueueableFn['fn'], | ||
timeout?: number | undefined, | ||
timeout?: number, | ||
) => Spec; | ||
@@ -146,4 +143,4 @@ throwingExpectationFailures: () => boolean; | ||
execute: ( | ||
runnablesToRun?: string[] | undefined, | ||
suiteTree?: Suite | undefined, | ||
runnablesToRun?: Array<string>, | ||
suiteTree?: Suite, | ||
) => Promise<void>; | ||
@@ -157,12 +154,9 @@ fdescribe: ( | ||
methodName: string, | ||
accessType?: keyof PropertyDescriptor | undefined, | ||
accessType?: keyof PropertyDescriptor, | ||
) => Spy; | ||
beforeEach: ( | ||
beforeEachFunction: QueueableFn['fn'], | ||
timeout?: number | undefined, | ||
timeout?: number, | ||
) => void; | ||
afterEach: ( | ||
afterEachFunction: QueueableFn['fn'], | ||
timeout?: number | undefined, | ||
) => void; | ||
afterEach: (afterEachFunction: QueueableFn['fn'], timeout?: number) => void; | ||
clearReporters: () => void; | ||
@@ -173,3 +167,3 @@ addReporter: (reporterToAdd: Reporter) => void; | ||
fn: QueueableFn['fn'], | ||
timeout?: number | undefined, | ||
timeout?: number, | ||
) => Spec; | ||
@@ -183,8 +177,5 @@ xdescribe: ( | ||
fn: QueueableFn['fn'], | ||
timeout?: number | undefined, | ||
timeout?: number, | ||
) => Spec; | ||
beforeAll: ( | ||
beforeAllFunction: QueueableFn['fn'], | ||
timeout?: number | undefined, | ||
) => void; | ||
beforeAll: (beforeAllFunction: QueueableFn['fn'], timeout?: number) => void; | ||
todo: () => Spec; | ||
@@ -191,0 +182,0 @@ provideFallbackReporter: (reporterToAdd: Reporter) => void; |
@@ -111,3 +111,3 @@ 'use strict'; | ||
stack = (0, _sourceMap.getCallsite)(4, sourcemaps); | ||
} // @ts-expect-error | ||
} // @ts-expect-error: `it` is `void` for some reason | ||
@@ -114,0 +114,0 @@ it.result.__callsite = stack; |
@@ -580,3 +580,3 @@ 'use strict'; | ||
const spec = specFactory( | ||
description, | ||
description, // eslint-disable-next-line @typescript-eslint/no-empty-function | ||
() => {}, | ||
@@ -583,0 +583,0 @@ currentDeclarationSuite |
@@ -40,3 +40,3 @@ 'use strict'; | ||
/* eslint-disable sort-keys */ | ||
/* eslint-disable sort-keys, @typescript-eslint/no-empty-function */ | ||
const noopTimer = { | ||
@@ -43,0 +43,0 @@ start() {}, |
@@ -44,13 +44,13 @@ 'use strict'; | ||
provideFallbackReporter; | ||
clearReporters; // @ts-expect-error | ||
clearReporters; // @ts-expect-error: confused by loop in ctor | ||
jasmineDone; // @ts-expect-error | ||
jasmineDone; // @ts-expect-error: confused by loop in ctor | ||
jasmineStarted; // @ts-expect-error | ||
jasmineStarted; // @ts-expect-error: confused by loop in ctor | ||
specDone; // @ts-expect-error | ||
specDone; // @ts-expect-error: confused by loop in ctor | ||
specStarted; // @ts-expect-error | ||
specStarted; // @ts-expect-error: confused by loop in ctor | ||
suiteDone; // @ts-expect-error | ||
suiteDone; // @ts-expect-error: confused by loop in ctor | ||
@@ -98,3 +98,3 @@ suiteStarted; | ||
if (reporter[method]) { | ||
// @ts-expect-error | ||
// @ts-expect-error: wrong context | ||
reporter[method].apply(reporter, args); | ||
@@ -101,0 +101,0 @@ } |
@@ -60,3 +60,3 @@ 'use strict'; | ||
/* eslint-disable sort-keys, local/prefer-spread-eventually, local/prefer-rest-params-eventually */ | ||
/* eslint-disable sort-keys, local/prefer-spread-eventually, local/prefer-rest-params-eventually, @typescript-eslint/no-empty-function */ | ||
class Spec { | ||
@@ -130,5 +130,6 @@ id; | ||
// https://crbug.com/v8/7142 | ||
// eslint-disable-next-line no-self-assign | ||
this.initError.stack = this.initError.stack; | ||
this.queueableFn.initError = this.initError; // @ts-expect-error | ||
this.queueableFn.initError = this.initError; // @ts-expect-error: misses some fields added later | ||
@@ -164,2 +165,3 @@ this.result = { | ||
execute(onComplete, enabled) { | ||
// eslint-disable-next-line @typescript-eslint/no-this-alias | ||
const self = this; | ||
@@ -184,3 +186,3 @@ this.onStart(this); | ||
onException() { | ||
// @ts-expect-error | ||
// @ts-expect-error: wrong context | ||
self.onException.apply(self, arguments); | ||
@@ -187,0 +189,0 @@ }, |
@@ -40,3 +40,3 @@ 'use strict'; | ||
/* eslint-disable local/ban-types-eventually, local/prefer-rest-params-eventually */ | ||
/* eslint-disable local/ban-types-eventually, local/prefer-rest-params-eventually, @typescript-eslint/no-empty-function */ | ||
class SpyStrategy { | ||
@@ -43,0 +43,0 @@ identity; |
@@ -101,2 +101,3 @@ 'use strict'; | ||
for ( | ||
// eslint-disable-next-line @typescript-eslint/no-this-alias | ||
let parentSuite = this; | ||
@@ -228,3 +229,3 @@ parentSuite; | ||
} | ||
} | ||
} // eslint-disable-next-line @typescript-eslint/no-empty-function | ||
@@ -231,0 +232,0 @@ execute(..._args) {} |
@@ -27,5 +27,5 @@ 'use strict'; | ||
return obj && typeof obj.then === 'function'; | ||
} | ||
} // eslint-disable-next-line @typescript-eslint/no-empty-function | ||
const doneFnNoop = () => {}; | ||
const doneFnNoop = () => {}; // eslint-disable-next-line @typescript-eslint/no-empty-function | ||
@@ -63,2 +63,3 @@ doneFnNoop.fail = () => {}; | ||
// https://crbug.com/v8/7142 | ||
// eslint-disable-next-line no-self-assign | ||
@@ -125,2 +126,3 @@ extraError.stack = extraError.stack; // We make *all* functions async and run `done` right away if they | ||
// https://crbug.com/v8/7142 | ||
// eslint-disable-next-line no-self-assign | ||
@@ -190,6 +192,8 @@ extraError.stack = extraError.stack; | ||
// being awaited on. | ||
// eslint-disable-next-line @typescript-eslint/no-empty-function | ||
promise.catch(() => {}); | ||
return spec; | ||
}; // each is binded after the function is made concurrent, so for now it is made noop | ||
}; // each is bound after the function is made concurrent, so for now it is made noop | ||
// eslint-disable-next-line @typescript-eslint/no-empty-function | ||
@@ -196,0 +200,0 @@ concurrentFn.each = () => () => {}; |
@@ -29,3 +29,4 @@ 'use strict'; | ||
_promise; | ||
_cancel; | ||
_cancel; // eslint-disable-next-line @typescript-eslint/no-empty-function | ||
_reject = () => {}; | ||
@@ -32,0 +33,0 @@ |
@@ -38,3 +38,3 @@ 'use strict'; | ||
this._startTimes = new Map(); | ||
} | ||
} // eslint-disable-next-line @typescript-eslint/no-empty-function | ||
@@ -41,0 +41,0 @@ jasmineStarted(_runDetails) {} |
@@ -59,3 +59,3 @@ 'use strict'; | ||
const patchJasmine = () => { | ||
// @ts-expect-error | ||
// @ts-expect-error: jasmine doesn't exist on globalThis | ||
globalThis.jasmine.Spec = (realSpec => { | ||
@@ -86,3 +86,3 @@ class Spec extends realSpec { | ||
return Spec; // @ts-expect-error | ||
return Spec; // @ts-expect-error: jasmine doesn't exist on globalThis | ||
})(globalThis.jasmine.Spec); | ||
@@ -89,0 +89,0 @@ }; |
@@ -14,2 +14,5 @@ 'use strict'; | ||
*/ | ||
// eslint-disable-next-line @typescript-eslint/no-empty-function | ||
const noop = () => {}; | ||
function treeProcessor(options) { | ||
@@ -31,3 +34,3 @@ const {nodeComplete, nodeStart, queueRunnerFactory, runnableIds, tree} = | ||
function getNodeWithoutChildrenHandler(node, enabled) { | ||
return function fn(done = () => {}) { | ||
return function fn(done = noop) { | ||
node.execute(done, enabled); | ||
@@ -38,3 +41,3 @@ }; | ||
function getNodeWithChildrenHandler(node, enabled) { | ||
return async function fn(done = () => {}) { | ||
return async function fn(done = noop) { | ||
nodeStart(node); | ||
@@ -41,0 +44,0 @@ await queueRunnerFactory({ |
{ | ||
"name": "jest-jasmine2", | ||
"version": "28.1.0", | ||
"version": "28.1.1", | ||
"repository": { | ||
@@ -20,7 +20,7 @@ "type": "git", | ||
"dependencies": { | ||
"@jest/environment": "^28.1.0", | ||
"@jest/expect": "^28.1.0", | ||
"@jest/environment": "^28.1.1", | ||
"@jest/expect": "^28.1.1", | ||
"@jest/source-map": "^28.0.2", | ||
"@jest/test-result": "^28.1.0", | ||
"@jest/types": "^28.1.0", | ||
"@jest/test-result": "^28.1.1", | ||
"@jest/types": "^28.1.1", | ||
"@types/node": "*", | ||
@@ -30,9 +30,9 @@ "chalk": "^4.0.0", | ||
"is-generator-fn": "^2.0.0", | ||
"jest-each": "^28.1.0", | ||
"jest-matcher-utils": "^28.1.0", | ||
"jest-message-util": "^28.1.0", | ||
"jest-runtime": "^28.1.0", | ||
"jest-snapshot": "^28.1.0", | ||
"jest-util": "^28.1.0", | ||
"pretty-format": "^28.1.0", | ||
"jest-each": "^28.1.1", | ||
"jest-matcher-utils": "^28.1.1", | ||
"jest-message-util": "^28.1.1", | ||
"jest-runtime": "^28.1.1", | ||
"jest-snapshot": "^28.1.1", | ||
"jest-util": "^28.1.1", | ||
"pretty-format": "^28.1.1", | ||
"throat": "^6.0.1" | ||
@@ -49,3 +49,3 @@ }, | ||
}, | ||
"gitHead": "f5db241312f46528389e55c38221e6b6968622cf" | ||
"gitHead": "eb954f8874960920ac50a8f976bb333fbb06ada9" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
117674
Updated@jest/environment@^28.1.1
Updated@jest/expect@^28.1.1
Updated@jest/test-result@^28.1.1
Updated@jest/types@^28.1.1
Updatedjest-each@^28.1.1
Updatedjest-matcher-utils@^28.1.1
Updatedjest-message-util@^28.1.1
Updatedjest-runtime@^28.1.1
Updatedjest-snapshot@^28.1.1
Updatedjest-util@^28.1.1
Updatedpretty-format@^28.1.1