diff --git a/CHANGELOG.md b/CHANGELOG.md index d00f74cc0afb..1553878924bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -88,6 +88,7 @@ - `[jest-haste-map]` [**BREAKING**] Migrate to ESM ([#10875](https://github.com/facebook/jest/pull/10875)) - `[jest-haste-map]` [**BREAKING**] Remove support for deprecated option `ignorePattern` as function ([#10348](https://github.com/facebook/jest/pull/10348)) - `[jest-jasmine2]` [**BREAKING**] Migrate to ESM ([#10906](https://github.com/facebook/jest/pull/10906)) +- `[jest-jasmine2]` [**BREAKING**] Remove unused options argument from `Env` constructor ([#10240](https://github.com/facebook/jest/pull/10240)) - `[jest-repl, jest-runtime]` [**BREAKING**] Move the `jest-runtime` CLI into `jest-repl` ([#10016](https://github.com/facebook/jest/pull/10016) & [#10925](https://github.com/facebook/jest/pull/10925)) - `[jest-resolve]` [**BREAKING**] Migrate to ESM ([#10688](https://github.com/facebook/jest/pull/10688)) - `[jest-resolve-dependencies]` [**BREAKING**] Migrate to ESM ([#10876](https://github.com/facebook/jest/pull/10876)) diff --git a/packages/jest-jasmine2/src/jasmine/Env.ts b/packages/jest-jasmine2/src/jasmine/Env.ts index a9b9f047ec02..4f141bb6b540 100644 --- a/packages/jest-jasmine2/src/jasmine/Env.ts +++ b/packages/jest-jasmine2/src/jasmine/Env.ts @@ -99,7 +99,7 @@ export default function (j$: Jasmine) { specDefinitions: SpecDefinitionsFn, ) => Suite; - constructor(_options?: Record) { + constructor() { let totalSpecsDefined = 0; let catchExceptions = true; diff --git a/packages/jest-jasmine2/src/jasmine/jasmineLight.ts b/packages/jest-jasmine2/src/jasmine/jasmineLight.ts index d7ee8aec1fd4..b54a79d8927e 100644 --- a/packages/jest-jasmine2/src/jasmine/jasmineLight.ts +++ b/packages/jest-jasmine2/src/jasmine/jasmineLight.ts @@ -45,8 +45,8 @@ export const create = function (createOptions: Record): Jasmine { j$._DEFAULT_TIMEOUT_INTERVAL = createOptions.testTimeout || 5000; - j$.getEnv = function (options?: Record) { - const env = (j$.currentEnv_ = j$.currentEnv_ || new j$.Env(options)); + j$.getEnv = function () { + const env = (j$.currentEnv_ = j$.currentEnv_ || new j$.Env()); //jasmine. singletons in here (setTimeout blah blah). return env; }; diff --git a/packages/jest-jasmine2/src/types.ts b/packages/jest-jasmine2/src/types.ts index 269dba59fe3a..f6832a815293 100644 --- a/packages/jest-jasmine2/src/types.ts +++ b/packages/jest-jasmine2/src/types.ts @@ -77,9 +77,7 @@ export type Jasmine = { _DEFAULT_TIMEOUT_INTERVAL: number; DEFAULT_TIMEOUT_INTERVAL: number; currentEnv_: ReturnType['prototype']; - getEnv: ( - options?: Record, - ) => ReturnType['prototype']; + getEnv: () => ReturnType['prototype']; createSpy: typeof createSpy; Env: ReturnType; JsApiReporter: typeof JsApiReporter;