1.0.16 • Published 10 years ago

phantomochajs v1.0.16

Weekly downloads
1
License
MIT
Repository
github
Last release
10 years ago

phantomochajs

Build Status

Auto generate test_runner.html for client-side tests (mocha + phantomjs)

Installation

$ npm install --save-dev phantomochajs

Usage (with gulp)

If you want to see examples, here is the link below:

Example: gulpfile.coffee

gulp = require "gulp"
phantomochajs = require "phantomochajs"

gulp.task "example/test", ->
  # specify test scripts in src
  gulp.src ["spec/spec_helper.coffee", "spec/**/*_spec.coffee", "spec/**/*_spec.js"]
    .pipe phantomochajs(
      host: "127.0.0.1"
      port: "28080"
    )

Run gulp

$ gulp example/test

Result

[21:00:00] Requiring external module coffee-script/register
[21:00:01] Using gulpfile ~/workspace/phantomochajs/gulpfile.coffee
[21:00:01] Starting 'example'...
[21:00:02] Finished 'example' after 573 ms


  this is coffeescript
    ✓ hello 

  this is javascript
    ✓ hello 


  2 passing (5ms)

Options

KeyTypeDefaultDescription
hostString127.0.0.1hostname of the webserver
portNumber28080port of the webserver
serverBooleanfalsekeep the webserver
dependenciesArrayrequirejsdepend modules
test_dependenciesArraymocha, chai, sinondepended modules on test
reporterStringspecmocha reporter

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

License

MIT

Links

1.0.16

10 years ago

1.0.15

10 years ago

1.0.14

10 years ago

1.0.13

10 years ago

1.0.12

10 years ago

1.0.10

10 years ago

1.0.9

10 years ago

1.0.8

10 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago