GithubHelp home page GithubHelp logo

seejohnrun / htmlcov-example Goto Github PK

View Code? Open in Web Editor NEW
12.0 3.0 3.0 97 KB

an example for setting up mocha & html-cov

Home Page: http://www.seejohncode.com/2012/03/13/setting-up-mocha-jscoverage/

JavaScript 100.00%

htmlcov-example's Introduction

htmlcov-example

This is an example project for how to set up html-cov with mocha

Installing

npm install

Will install the dependencies (mocha & should) for the project.

Generate Coverage Report

make coverage

will create a file called coverage.html with the coverage report.

Running Tests

make

will run the tests

htmlcov-example's People

Contributors

seejohnrun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

htmlcov-example's Issues

i can't execute make test successfully?

my node version 0.8.5

path.existsSync is now called fs.existsSync.

Collection
when empty
1) should contain no elements
with one element
2) should contain one element
when removing the only element
3) should contain no elements

?.3 of 3 tests failed:

  1. Collection when empty should contain no elements:
    AssertionError: expected {} to equal 0
    at Object.Assertion.equal (/home/dan/projects/htmlcov-example/node_modules/should/lib/should.js:306:10)
    at Context.element (/home/dan/projects/htmlcov-example/test/collection_test.js:15:33)
    at Test.Runnable.run (/home/dan/projects/htmlcov-example/node_modules/mocha/lib/runnable.js:156:32)
    at Runner.runTest (/home/dan/projects/htmlcov-example/node_modules/mocha/lib/runner.js:272:10)
    at Runner.runTests.next (/home/dan/projects/htmlcov-example/node_modules/mocha/lib/runner.js:316:12)
    at next (/home/dan/projects/htmlcov-example/node_modules/mocha/lib/runner.js:199:14)
    at Runner.hooks (/home/dan/projects/htmlcov-example/node_modules/mocha/lib/runner.js:208:7)
    at next (/home/dan/projects/htmlcov-example/node_modules/mocha/lib/runner.js:157:23)
    at Runner.hook (/home/dan/projects/htmlcov-example/node_modules/mocha/lib/runner.js:176:5)
    at process.startup.processNextTick.process._tickCallback (node.js:244:9)

  2. Collection with one element should contain one element:
    AssertionError: expected {} to equal 1
    at Object.Assertion.equal (/home/dan/projects/htmlcov-example/node_modules/should/lib/should.js:306:10)
    at Context. (/home/dan/projects/htmlcov-example/test/collection_test.js:31:33)
    at Test.Runnable.run (/home/dan/projects/htmlcov-example/node_modules/mocha/lib/runnable.js:156:32)
    at Runner.runTest (/home/dan/projects/htmlcov-example/node_modules/mocha/lib/runner.js:272:10)
    at Runner.runTests.next (/home/dan/projects/htmlcov-example/node_modules/mocha/lib/runner.js:316:12)
    at next (/home/dan/projects/htmlcov-example/node_modules/mocha/lib/runner.js:199:14)
    at Runner.hooks (/home/dan/projects/htmlcov-example/node_modules/mocha/lib/runner.js:208:7)
    at next (/home/dan/projects/htmlcov-example/node_modules/mocha/lib/runner.js:157:23)
    at Runner.hook (/home/dan/projects/htmlcov-example/node_modules/mocha/lib/runner.js:176:5)
    at process.startup.processNextTick.process._tickCallback (node.js:244:9)

  3. Collection with one element when removing the only element should contain no elements:
    AssertionError: expected {} to equal 0
    at Object.Assertion.equal (/home/dan/projects/htmlcov-example/node_modules/should/lib/should.js:306:10)
    at Context. (/home/dan/projects/htmlcov-example/test/collection_test.js:41:35)
    at Test.Runnable.run (/home/dan/projects/htmlcov-example/node_modules/mocha/lib/runnable.js:156:32)
    at Runner.runTest (/home/dan/projects/htmlcov-example/node_modules/mocha/lib/runner.js:272:10)
    at Runner.runTests.next (/home/dan/projects/htmlcov-example/node_modules/mocha/lib/runner.js:316:12)
    at next (/home/dan/projects/htmlcov-example/node_modules/mocha/lib/runner.js:199:14)
    at Runner.hooks (/home/dan/projects/htmlcov-example/node_modules/mocha/lib/runner.js:208:7)
    at next (/home/dan/projects/htmlcov-example/node_modules/mocha/lib/runner.js:157:23)
    at Runner.hook (/home/dan/projects/htmlcov-example/node_modules/mocha/lib/runner.js:176:5)
    at process.startup.processNextTick.process._tickCallback (node.js:244:9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.