Skip to content

sutara79/demo-qunit

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

demo-qunit

Build Status Coverage Status dependencies Status devDependencies Status

An example of unit testing and code coverage for jQuery plugin.

Forked

https://github.com/thorst/Code-Coverage-Qunit

Using

Usage

  1. Fork and clone the repo.
  2. Run npm install to install all dependencies (including grunt).
  3. Run npm run to know what you can do.

Unit Testing

  • Browser: Access to ./test/index.html.
  • Command Line: Run npm test. You can also get code coverage.
$ npm test

> [email protected] test /path/to/folder
> grunt qunit

Running "qunit:files" (qunit) task
Testing test/index.html .OK
>> 3 assertions passed (66ms)
>> Coverage:
>> -  Lines: 100%
>> -  Statements: 100%
>> -  Functions: 100%
>> -  Branches: 100%

Done.

Code Coverage

Run npm test like above.
Then access to ./coverage/lcov-report/index.html to get the datails.

License

MIT

Author

Yuusaku Miyazaki [email protected]

About

An example of unit test and code coverage for jQuery plugin.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 42.9%
  • CSS 30.4%
  • HTML 26.7%