Skip to content

Extend bootstrap/teardown configuration options behaviour #319

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

Merged
merged 1 commit into from
Dec 10, 2016

Conversation

pscanf
Copy link
Contributor

@pscanf pscanf commented Dec 8, 2016

bootstrap config option

Current behaviour:

  • when bootstrap is a path to a js file, the file is required. If the file exports a function, the function is called with a callback

Proposed behaviour:

  • when bootstrap is a path to a js file, the file is required. If the file exports a function, the function is called with a callback
  • when bootstrap is a function, it's called with a callback

teardown config option

Current behaviour:

  • when teardown is a path to a js file, the file is required. If the file exports a function, the function is not called (inconsistent with the bootstrap behaviour)

Proposed behaviour:

  • when teardown is a path to a js file, the file is required. If the file exports a function, the function is called (consistent with the bootstrap behaviour, aside from the callback which is not necessary)
  • when teardown is a function, it's called

@DavertMik
Copy link
Contributor

Please make sure your changes are compatible with #303
I.e. we need async support for bootstrap files

@DavertMik
Copy link
Contributor

Yeah, looks they really are. Thanks for the PR. I think I can merge it )

@DavertMik DavertMik merged commit 03609bc into codeceptjs:master Dec 10, 2016
@pscanf
Copy link
Contributor Author

pscanf commented Dec 10, 2016

Yeah, sorry. I had a busy day and forgot to reply. But I also confirm, they're intended to be compatible. Thanks for the merge. 🙂

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

Successfully merging this pull request may close these issues.

2 participants