https://github.com/azer/prova-retired
RETIRED Check out http://github.com/azer/prova
https://github.com/azer/prova-retired
Last synced: 10 months ago
JSON representation
RETIRED Check out http://github.com/azer/prova
- Host: GitHub
- URL: https://github.com/azer/prova-retired
- Owner: azer
- Created: 2013-03-18T07:55:57.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2014-02-25T05:09:55.000Z (over 12 years ago)
- Last Synced: 2025-08-03T11:53:27.871Z (11 months ago)
- Language: JavaScript
- Homepage:
- Size: 1.09 MB
- Stars: 57
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Prova [](https://travis-ci.org/azer/prova)
A new pragmatic JavaScript testing framework for both NodeJS and browsers. [Screencast](https://vimeo.com/72334347)
## Features
- No configuration needed.
- It's quite simple, run `prova` command to run on Node, add `-b` parameter to run on browsers (browserifies for you)
- Keep the browsers always open, it enables watchify as well, so your browser will run your tests automatically
- Headless testing is simple as well, run tests in PhantomJS by `-i` parameter.
- Beautified error output that show failing lines.
- ChaiJS is injected to every module to avoid repeating. If you don't prefer injection, pass `-V` to avoid it.
- Mostly compatible with Mocha.
## Install
```bash
$ npm install -g prova
```
## First Steps
Create a new test document and name it `test.js`. [ChaiJS'](http://chaijs.com) `expect` and `assert` modules are injected to the test modules by default;
```js
describe('Number', function(){
it('converts a date to a number', function(){
expect( Number(new Date) ).to.be.a('number')
})
})
```
Available BDD methods:
* before
* beforeEach
* describe
* it
* afterEach
* after
## Running on Node
```bash
$ prova # It'll look modules like test.js and test/index by default. You can specify them manually; prova test_foo.js test_b*.js
OK, passed 1 test.
```

## Running On Browsers
```bash
$ prova -b
Visit localhost:7559 to run tests on a web browser
```
Once you pass `-b` parameter, Prova [compiles your source code for browsers](https://github.com/azer/fox/blob/master/lib/browser.js) and [publishes](https://github.com/azer/fox/blob/master/lib/server.js) [a web page](https://github.com/azer/fox/blob/master/web/index.html) where you can run and see the test results.
## Running On PhantomJS Headlessly
If you have PhantomJS installed in your system, run Prova with `-i` parameters to run the tests headlessly;
```bash
$ prova -i
```
