-
Notifications
You must be signed in to change notification settings - Fork 30
Support custom interfaces #33
Comments
Yes absolutely |
Here are my current thoughts on the subject. Require a static variable on the interface, something like The object would look like this:
Example file:
Example file 2:
Then wdio-mocha-framework adapter would process this description wrap it appropriately. The static I don't mind looking into this if the plan looks good to you, but it might be a little while before I get to it. I am guessing I have a unique use case an no one else is clamoring for this one though. We could also optionally default to bdd, but that seems potentially dangerous as not wrapping the needed functions would cause unexpected behavior. I think that throwing an error when description is not specified would be a better option. |
@ckedwards PRs are welcome. |
It would be nice if wdio-mocha-framwork supported custom mocha interfaces.
My use case is rather complex and I wanted to "extend" describe to handle some logic for the user (setting up the connection to our benchmarking service and closing the session after the test is done). The reason why I didn't want to use beforeSuite/afterSuite is because I didn't want all suites to create sessions.
My problem is that wdio-mocha-framwork rejects my interface because it is not in the INTERFACES object. I was not sure what the wrapping commands in fiber context is for (though it looks need) and I haven't looked into it too much. However I did try adding my interface to the INTERFACES object as a hack and it seemed to work.
Does this seem like a reasonable request?
The text was updated successfully, but these errors were encountered: