Comments (7)
Yes, discussion is a good idea :)
possibility to mark a test as TODO
Not sure I see much of a use for this, perhaps you have some example use cases? I want to be careful not to overcomplicate test running.
ability to skip tests
Perhaps this could be achieved by adding a 'condition' function to testCase, along with the setUp and tearDown functions? However, I think I'd be tempted to just split these tests into different directories and have your test script or makefile use different directories as a target.
Group naming
I absolutely agree. This probably means updating the testrunner api to accept an array for the name instead of a string.
Removal of stacktrace
Sometimes they are useful, sometimes not. There is a lot of nodeunit noise in there, but usually the line number the test failed on makes it in there too. If you were to implement this I think it should be as a command-line option to the testrunner.
...in summary, I'm yet to be convinced by the first two. I'd definitely like to see the third idea implemented, and the final one I'd be happy to accept as an option to the testrunner.
from nodeunit.
possibility to mark a test as TODO
It is related to removal of stacktrace, for example if you write many tests in advance, you don't want the output to be littered with stacktraces.
Also it gives a hint that the test is assumed to fail, and that it is not an regression.
ability to skip tests
That is why I said some of the reasons are merely syntactic sugar. The major reason though is to skip multiple tests if one or more single test fails.
Removal of stacktrace
I only think that current filename and current test function is of need; perhaps also line number. The other nine rows of stack trace sadly doesn't help much :(
from nodeunit.
If there is a reliable way to clean up the stacktrace, that would be good.
from nodeunit.
There is http://code.google.com/p/v8/wiki/JavaScriptStackTraceApi
I tried it a bit, but didn't get hang of it much.
from nodeunit.
I would say only include stack traces down to inside nodeunit.js
from nodeunit.
ability to skip tests
- A test should not be run if a test that tests relevant dependency fails
- A test might not be testable if no network connection exists
- A test might be expensive is computation, and might not be run often
- A test might not be applicable on certain hardware
- A sub type of skip could also be to be able to skip the test of a whole group if a test fails, but still test all other tests.
I think this must be into wscript or Makefile. Group of tests with some dependency can be placed into one file or folder, for example. There are many cases where some test should be skipped and I think all of them shouldn't be implemented in test suite.
from nodeunit.
I'm going to open separate issues for group naming and stacktrace improvements.
from nodeunit.
Related Issues (20)
- Some reporters do not display assertion error message HOT 4
- TAP reporter is broken in [email protected]+ (works in nodeunit 0.9.2) HOT 9
- issues with the _deepEqual algorithm HOT 2
- replace the old makefile with browserify or webpack
- Add explicit process exit on success HOT 1
- nodeunit.js in examples/browser is out of date HOT 1
- Incorrect exit code when running multiple directories HOT 2
- ReferenceError when using junit reporter in 0.11.0 HOT 4
- Q: Is there a better way to dynamically create tests than a monkey-patch? HOT 1
- Release 0.11.1 HOT 1
- FYI: nodeunit plugin for exhaustive testing of asynchronous sequences HOT 1
- setUp & tearDown not called as docs would imply
- Ways to skip, and run single(s) tests
- ES6 Module export
- Use template-literal instead of EJS
- Not all reporters support recursion. HOT 7
- Tap dependency update to v11 HOT 9
- make test on fresh clone failes due to undeclared dependencies HOT 1
- How to export function from module without nodeunit testing it?
- how to output html reporter to the file HOT 1
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 nodeunit.