`@sapui5/ts-types-esm` - `opaQunit` should be an overload & `async` option should be optional
Open
Nobody has claimed this yet.
types
- Dominant language
- TypeScript
- Stars
- 213
- Forks
- 35
- Avg merge
- 37m
- Merged PRs (30d)
- 1
Description
declare module "sap/ui/test/opaQunit" {
export default function opaQunit(
/**
* name of the QUnit test.
*/
testName: string,
/**
* integer value only supported in QUnit v1.x: denotes how many assertions are expected to be made in the
* test. If a function is passed instead, it is considered to be the callback parameter
*/
expected: int | Function,
/**
* the test function. Expects 3 arguments, in order: {@link sap.ui.test.Opa.config}.arrangements, {@link
* sap.ui.test.Opa.config}.actions, {@link sap.ui.test.Opa.config}.assertions. These arguments will be prefilled
* by OPA
*/
callback: Function,
/**
* available only in QUnit v1.x. Indicates whether the test is asynchronous. False by default.
*/
async: boolean
): void;
}
if that documentation is correct, the definition should instead be something like:
declare module 'sap/ui/test/opaQunit' {
export default function opaQunit(
testName: string,
expected: int,
callback: Function,
async?: boolean,
): void
export default function opaQunit(testName: string, callback: Function, async?: boolean): void
}
(assuming async becomes the third argument if a callback is provided as the second, i'm not sure how the impl handles it)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the declaration for the sap/ui/test/opaQunit module and compare its signature with the documented argument forms in the issue. Confirm how the implementation handles async when the callback is the second argument, then update the overloads and verify the generated TypeScript definitions if repository checks are available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100