Adds on to mocha.js.
Provides a different way to implement
after() hook that properly cleans
itself up after every test run simplifying several common test patterns.
See the annotated source at http://gh.chakrit.net/mocha-subject/
var ms =TestObject = ;ms; // (optional) uses globoally.;
Compares this to proper manual setups/teardowns:
var ms =TestObject = ;;
afterblock just to make sure you don't leak variables to another test or setup stuff with conflicting names.
Please file a GitHub issue for any question, bug reports or support requests.
Subjectclass to factor out setups/teardowns code even futher.
disinfect()requires you to set the
--globalsflags for mocha manually.