An open API service indexing awesome lists of open source software.

https://github.com/sutara79/demo-mocha-phantomjs-core

My practice to use mocha-phantomjs-core
https://github.com/sutara79/demo-mocha-phantomjs-core

mocha phantomjs practice

Last synced: 3 months ago
JSON representation

My practice to use mocha-phantomjs-core

Awesome Lists containing this project

README

        

# demo-mocha-phantomjs-core

[![Build Status](https://travis-ci.org/sutara79/demo-mocha-phantomjs-core.svg?branch=master)](https://travis-ci.org/sutara79/demo-mocha-phantomjs-core)

Unit testing for client side JavaScript with DOM.
**Do not use ES6(ES2015) or later.**
Otherwise testing on CLI will fail.

## Demo for the testing target
https://sutara79.github.io/demo-mocha-phantomjs-core/

## Testing
### Browser
https://sutara79.github.io/demo-mocha-phantomjs-core/test/index.html

### CLI
```
$ npm test

> [email protected] test
> phantomjs ./node_modules/mocha-phantomjs-core/mocha-phantomjs-core.js test/index.html

jquery.set-year.js
✓ int_year should be above 2000
✓ length of int_year should be 4

2 passing (9ms)
```

## Dependencies
- [phantomjs-prebuilt](https://github.com/Medium/phantomjs)
- [mocha-phantomjs-core](https://github.com/nathanboktae/mocha-phantomjs-core)
- [mocha](https://github.com/mochajs/mocha)
- [power-assert](https://github.com/power-assert-js/power-assert)