Skip to content

Readme shows invalid function type passed to before block (functional tests) #39

Open
@justinbc820

Description

@justinbc820

Expected behavior

In the Readme, the before block in a functional suite should take a SuiteLifecycleFunction, which returns PromiseLike.

Current behavior

The readme shows the function passed to the before block returning Promise<Command, any>.

Possible solution

before(async ({ remote }) => {
	await remote
		.get('_dist/src/index.html')
		.setFindTimeout(5000)
		.findDisplayedByCssSelector('body.loaded');
});

/***** OR *****/

before(({ remote }) => {
	return remote
		.get('_dist/src/index.html')
		.setFindTimeout(5000)
		.findDisplayedByCssSelector('body.loaded')
		.end();
});

Steps to reproduce (for bugs)

no steps, just look in the readme. Typescript just complains about the wrong type being returned.

Environment

Example (e.g., dojo, backbone, etc.):
Intern version:
Node version:
NPM version:
Browser version:

Additional information

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions