Skip to content
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

Added support to runModules directly in minimal and default reporters #106

Merged
merged 3 commits into from Oct 29, 2011

Conversation

deitch
Copy link
Contributor

@deitch deitch commented Sep 21, 2011

Allows for you to create tests directly or in non-standard files. I should probably extend it to html.js as well, haven't gotten to it yet.

Just adds some flexibility with minimal changes, and allows me to, for example, share tests between browsers that expect global vars or objects, and node tests.

@deitch
Copy link
Contributor Author

deitch commented Sep 21, 2011

For reference, check out issue #105 on caolan/nodeunit

… If none is specified, it still defaults to document.body
@deitch
Copy link
Contributor Author

deitch commented Sep 21, 2011

Added one more change. The browser reporter always writes to document.body, which may not be good if there are multiple elements on the page, e.g. a testrunner interface or other reporting.

Since nodeunit.run() in the browser already supports an options object as a second parameter, I added a "div" option. If it is present, the results of the test are written to the passed element; if not, it still defaults to document.body, so the default behaviour is unchanged.

This makes it much more useful in the browser.

@deitch
Copy link
Contributor Author

deitch commented Oct 9, 2011

caolan? Any movement on this?

caolan pushed a commit that referenced this pull request Oct 29, 2011
Added support to runModules directly in minimal and default reporters
@caolan caolan merged commit 74a3281 into caolan:master Oct 29, 2011
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.

None yet

2 participants