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

Cannot add specDone after upgrade to later @types/jasmine #697

Open
2 tasks
sebaKwiat opened this issue Jan 14, 2022 · 1 comment
Open
2 tasks

Cannot add specDone after upgrade to later @types/jasmine #697

sebaKwiat opened this issue Jan 14, 2022 · 1 comment

Comments

@sebaKwiat
Copy link

sebaKwiat commented Jan 14, 2022

Check with "x":

Current behavior
I cannot add SpecDone to jasmine.getEnv().addReporter this seemd to broke after upgrade to later jasmine.
Previously I had jasmine 3.6.3 looks like upgrade to later @types/jasmine is causing this.

image

(method) jasmine.CustomReporter.specDone?(result: jasmine.SpecResult, done?: (() => void) | undefined): void | Promise
Type '(result: SpecResult, specDone: (() => void) | undefined) => Promise | undefined' is not assignable to type '(result: SpecResult, done?: (() => void) | undefined) => void | Promise'.
Type 'Promise | undefined' is not assignable to type 'void | Promise'.
Type 'Promise' is not assignable to type 'void | Promise'.
Type 'Promise' is missing the following properties from type 'Promise': [Symbol.toStringTag], finallyts(2322)
index.d.ts(1042, 9): The expected type comes from property 'specDone' which is declared here on type 'CustomReporter'

"@types/jasmine": "^3.10.3",
"jasmine": "^3.99.0",
"jasmine-reporters": "^2.5.0",
"jasmine-spec-reporter": "^7.0.0",

Expected behavior

Minimal reproduction of the problem with instructions

@sebaKwiat sebaKwiat changed the title Cannot add specDone after upgrade to later jasmine-spec-reporter Cannot add specDone after upgrade to later jasmine 3.99.0 from 3.6.3 Jan 14, 2022
@sebaKwiat
Copy link
Author

problem is solved when i change types jasmin to older @types/jasmine": "3.6.2" however i keep jasmine as "jasmine": "^3.99.0"

@sebaKwiat sebaKwiat changed the title Cannot add specDone after upgrade to later jasmine 3.99.0 from 3.6.3 Cannot add specDone after upgrade to later @types/jasmine Jan 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant