Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(jasmine): remove unused options param #10240

Merged
merged 2 commits into from Mar 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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