Skip to content

Commit

Permalink
fix(jasmine): remove unused options param (#10240)
Browse files Browse the repository at this point in the history
  • Loading branch information
G-Rath committed Mar 30, 2021
1 parent b3f9e4a commit 40d04d8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-jasmine2/src/jasmine/Env.ts
Expand Up @@ -99,7 +99,7 @@ export default function (j$: Jasmine) {
specDefinitions: SpecDefinitionsFn,
) => Suite;

constructor(_options?: Record<string, unknown>) {
constructor() {
let totalSpecsDefined = 0;

let catchExceptions = true;
Expand Down
4 changes: 2 additions & 2 deletions packages/jest-jasmine2/src/jasmine/jasmineLight.ts
Expand Up @@ -45,8 +45,8 @@ export const create = function (createOptions: Record<string, any>): Jasmine {

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

j$.getEnv = function (options?: Record<string, unknown>) {
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;
};
Expand Down
4 changes: 1 addition & 3 deletions packages/jest-jasmine2/src/types.ts
Expand Up @@ -77,9 +77,7 @@ export type Jasmine = {
_DEFAULT_TIMEOUT_INTERVAL: number;
DEFAULT_TIMEOUT_INTERVAL: number;
currentEnv_: ReturnType<typeof Env>['prototype'];
getEnv: (
options?: Record<string, unknown>,
) => ReturnType<typeof Env>['prototype'];
getEnv: () => ReturnType<typeof Env>['prototype'];
createSpy: typeof createSpy;
Env: ReturnType<typeof Env>;
JsApiReporter: typeof JsApiReporter;
Expand Down

0 comments on commit 40d04d8

Please sign in to comment.