Skip to content

Commit 40d04d8

Browse files
authored
fix(jasmine): remove unused options param (#10240)
1 parent b3f9e4a commit 40d04d8

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@
8888
- `[jest-haste-map]` [**BREAKING**] Migrate to ESM ([#10875](https://github.com/facebook/jest/pull/10875))
8989
- `[jest-haste-map]` [**BREAKING**] Remove support for deprecated option `ignorePattern` as function ([#10348](https://github.com/facebook/jest/pull/10348))
9090
- `[jest-jasmine2]` [**BREAKING**] Migrate to ESM ([#10906](https://github.com/facebook/jest/pull/10906))
91+
- `[jest-jasmine2]` [**BREAKING**] Remove unused options argument from `Env` constructor ([#10240](https://github.com/facebook/jest/pull/10240))
9192
- `[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))
9293
- `[jest-resolve]` [**BREAKING**] Migrate to ESM ([#10688](https://github.com/facebook/jest/pull/10688))
9394
- `[jest-resolve-dependencies]` [**BREAKING**] Migrate to ESM ([#10876](https://github.com/facebook/jest/pull/10876))

packages/jest-jasmine2/src/jasmine/Env.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export default function (j$: Jasmine) {
9999
specDefinitions: SpecDefinitionsFn,
100100
) => Suite;
101101

102-
constructor(_options?: Record<string, unknown>) {
102+
constructor() {
103103
let totalSpecsDefined = 0;
104104

105105
let catchExceptions = true;

packages/jest-jasmine2/src/jasmine/jasmineLight.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ export const create = function (createOptions: Record<string, any>): Jasmine {
4545

4646
j$._DEFAULT_TIMEOUT_INTERVAL = createOptions.testTimeout || 5000;
4747

48-
j$.getEnv = function (options?: Record<string, unknown>) {
49-
const env = (j$.currentEnv_ = j$.currentEnv_ || new j$.Env(options));
48+
j$.getEnv = function () {
49+
const env = (j$.currentEnv_ = j$.currentEnv_ || new j$.Env());
5050
//jasmine. singletons in here (setTimeout blah blah).
5151
return env;
5252
};

packages/jest-jasmine2/src/types.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,7 @@ export type Jasmine = {
7777
_DEFAULT_TIMEOUT_INTERVAL: number;
7878
DEFAULT_TIMEOUT_INTERVAL: number;
7979
currentEnv_: ReturnType<typeof Env>['prototype'];
80-
getEnv: (
81-
options?: Record<string, unknown>,
82-
) => ReturnType<typeof Env>['prototype'];
80+
getEnv: () => ReturnType<typeof Env>['prototype'];
8381
createSpy: typeof createSpy;
8482
Env: ReturnType<typeof Env>;
8583
JsApiReporter: typeof JsApiReporter;

0 commit comments

Comments
 (0)