Awesome
Introduction
Optimus is a simple way to bind an initial test runner environment using a JavaScript testing framework of your choice. It's highly recommended you care about quality and maintainable codes. Tests are the best way to do that.
Have fun testing your code. :)
What is included?
So far, Optimus includes tests with:
- Mocha (and chai)
- Jasmine
- QUnit
Check Issues for next updates.
Getting Started
Installation
1 - First of all, make sure you have Node.js installed. <br/> 2 - Clone this repository and access the generated folder
$ git clone git://github.com/vitorbritto/optimus.git [project-name]
$ cd [project-name]
3 - Install dependencies and run the program
$ npm i
$ node optimus
4 - Profit!
Update Dependencies
All vendor files are added with git submodules or NPM, so you can easily update them.
Run Tests
With Makefile:
Each boilerplate folder contains a Makefile with these tasks:
make init-test
: Execute the git submodules.make update-test
: Updates the node packages and / or the git submodules.make watch-test
: Run the test suite and watch for changes.make test
: Run the test suite, with the framework's command line tool or grunt.
With Grunt:
The boilerplates also contain grunt files, so you can easily re-run the tests when files change.
grunt
: Lint script files, run the test suite and watch for changes.grunt test
: Execute Spec Runner.grunt lint
: Lint Scripts
General Structure
Each boilerplate contains these standard files:
.
├── .jshintrc
├── .travis.yml
├── Gruntfile.js
├── Makefile
├── README.md
├── app
│ ├── scripts
│ │ └── modules
│ └── styles
├── package.json
├── public
└── spec
├── helpers
├── index.html
├── init.js
└── modules
Some of these frameworks don't have a grunt plugin. Thus, only makefile will be available to execute the tasks with the framework's command line tool.
References
Tools
- QUnit - QUnit is a powerful, easy-to-use JavaScript unit testing framework.
- Mocha - Mocha is a feature-rich JavaScript test framework running on node.js and the browser, making asynchronous testing simple and fun.
- Jasmine - BDD, framework independent, easy integration with Ruby projects and continuous builds. Allows for both DOM-less testing and asynchronous testing.
- Chai - Chai is a BDD / TDD assertion library for node and the browser that can be delightfully paired with any javascript testing framework.
Docs
Discussions
License
MIT License © Vitor Britto