Comments (3)
Does this seem like a reasonable request?
Yes absolutely
from wdio-mocha-framework.
Here are my current thoughts on the subject.
Require a static variable on the interface, something like description
. The description could be a string or an object. So if are just "extending" bdd you could say description="bdd"
, but if you have some some completely alternate interface you would need to be more descriptive.
The object would look like this:
description: {
hooks:["beforeEach", "foo", "bar"]
test: "it"
}
Example file:
var Mocha = require('mocha');
module.exports = Mocha.interfaces["test-interface"] = function(suite) {
.. Normal logic here...
}
module.exports.description = "bdd";
Example file 2:
var Mocha = require('mocha');
module.exports = Mocha.interfaces["test-foo-interface"] = function(suite) {
.. Normal logic here...
}
module.exports.description = {
hooks:["foo", "bar"],
test: "HiYa"
};
Then wdio-mocha-framework adapter would process this description wrap it appropriately. The static INTERFACES
descriptions would change for consistency.
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.
from wdio-mocha-framework.
@ckedwards PRs are welcome.
from wdio-mocha-framework.
Related Issues (20)
- Pass through custom keys added to the test object HOT 9
- Release next version to update dependencies HOT 2
- Access to the mocha test context inside hooks
- Retries Not Woking HOT 1
- Support an equivalent to --exit for Mocha HOT 8
- Problems with fibers installing on Raspberry Pi HOT 1
- Version 10 of node.js has been released
- ERROR: Cannot find module 'react-native' HOT 1
- error when trying to install with node version 11.5.0 HOT 1
- The whole test suite is failed when beforeEach hook is failed
- Update fibers HOT 7
- Not support Node V12 HOT 1
- Can't install package on node 7.4.0+, Windows HOT 3
- Describe.only ignored HOT 1
- package is not getting installed for most node verions on windows system 8.1
- An in-range update of babel-runtime is breaking the build 🚨 HOT 1
- Mocha test pass if there is some Error HOT 1
- Unexpected Token import HOT 3
- An in-range update of mocha is breaking the build 🚨 HOT 1
- done() is not a function HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wdio-mocha-framework.