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

FuncUnit NPM module #72

Open
daffl opened this issue Feb 26, 2014 · 3 comments
Open

FuncUnit NPM module #72

daffl opened this issue Feb 26, 2014 · 3 comments
Labels

Comments

@daffl
Copy link
Contributor

daffl commented Feb 26, 2014

To follow up on the discussion if FuncUnit should be an NPM module started in #40 I propose the following:

Provide FuncUnit itself (basically this repository) as an NPM module but additionally add a funcunit command line tool which lets you

  • Run tests in different browsers (PhantomJS by default) on the command line using Testee
  • Initialize the default HTML page plus the library
  • Provide a server that gathers and runs all your tests

For example:

funcunit run module.test.js --lib mocha

Will run the tests from module.test.js in PhantomJS using a default HTML test page with Mocha initialized (module.test.js has to be a valid Mocha test file of course) and report to the command line.

funcunit run *.test.js --lib qunit --browser firefox

Will run all .test.js files in Firefox using a default HTML test page with QUnit initialized and report to the command line.

funcunit server *.test.js --lib jasmine

Will start up a static webserver that when opened in a webbrowser will serve the default HTML page with Jasmine initialized and run all .test.js files in the current folder.

funcunit init test/index.html --lib mocha

Will write the default HTML test page with Mocha and FuncUnit to test/index.html.

@matthewp
Copy link
Contributor

So is funcunit basically just sugar on top of testee? Or is it doing something differently? If it's just sugar I think it might be too much maintenance burden to be worth it.

@daffl
Copy link
Contributor Author

daffl commented Feb 26, 2014

Well the additional functionality is to provide a template HTML file for your tests and be able to generate and copy them.

Basically when using the FuncUnit command line tool you just write your tests and don't need to maintain a separate test HTML file or have the libraries available (but you can initialize them if you want). Plus serving it on a static webserver will enforce writing decoupled tests.

@matthewp
Copy link
Contributor

Makes sense, 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants