thedeeno / web-component-tester-istanbul

Instanbul coverage reporting for projects being tested by web-component-tester
28 stars 29 forks source link

Add working example #4

Open AlexanderZeilmann opened 9 years ago

AlexanderZeilmann commented 9 years ago

Could you add a working example to the repository, demonstrating the use of web-component-tester-istanbul?

I am currently having the problem, that all my tetsts run with out any problem, but web-component-tester-istanbul claims that no files are covered. The result is always:

=============================== Coverage summary ===============================
Statements   : 100% ( 0/0 )
Branches     : 100% ( 0/0 )
Functions    : 100% ( 0/0 )
Lines        : 100% ( 0/0 )
================================================================================

A working example on which I can base my tests would help a lot.

Klathmon commented 9 years ago

What version of this plugin are you using with which version of web-component-tester?

The current version of this plugin will not work with the current of WCT.

I have a forked version which will, and you can check my repo here for an example of it in use. Look at the gruntfile near the bottom for the configuration i'm using, and as long as the plugin is installed it should work.

AlexanderZeilmann commented 9 years ago

Thanks @Klathmon I got it working, because of your example :-D I had my tests in a seperate folder and not in subfolders of the webcomponents, like you did. I still have no clue, why this didn't work :-/

@thedeeno could you merge the pull request #3, so that this repo is working again? Thanks :-)

I'll leave this issue open, since I still think it is important to add usage example to this repo.

thedeeno commented 9 years ago

@alawatthe Merged. Agreed on the usage example. Hopefully I'll have some time soon to wip that up.

AlexanderZeilmann commented 9 years ago

@thedeeno Thanks :-D Could you also do a npm publish?

thedeeno commented 9 years ago

@alawatthe Bumped to 0.8.0 and published

cklanac commented 8 years ago

Here's a demo using the Polymer Seed Element at https://github.com/cklanac/seed-element

module.exports = {
    "plugins": {
        "local": {
            "browsers": ["chrome"]
        },
        "istanbul": {
            "dir": "./coverage",
            "reporters": ["text-summary", "lcov"],
            "include": [
                "/*-element.html"
            ],
            "exclude": [

            ]
        }
    }
};

A few things to note:

philipbeadle commented 8 years ago

Worked perfectly straight out of the box!!!

AnitaMehta commented 7 years ago

Have done same steps, but I am getting the error:

express.use is not a function

Could please tell me what is this?

srk289 commented 7 years ago

@AnitaMehta This plugin needs "web-component-tester": "^6.0.0-prerelease.2" See how you go.

eoutterson commented 7 years ago

This used to work 6 months ago. But now having this issue on my codebase with the updated components. Is there an issue with what directories can be specified for WCTistanbul?