thedeeno / web-component-tester-istanbul

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

TypeError: express.use is not a function #37

Closed lukasoppermann closed 2 years ago

lukasoppermann commented 8 years ago

When I try to run the test I always get this error TypeError: express.use is not a function.

It does not matter if I run wct from within node_modules or the global installation. When I remove the plugin again it works fine and all tests pass.

My wct.conf.js has this content:

module.exports = {
    "verbose": false,
    "plugins": {
        "local": {
          "browsers": ["chrome"]
      },
      istanbul: {
        dir: "./coverage",
        reporters: ["text-summary", "lcov"],
        include: [
          "src/*.js"
        ],
        exclude: [
          "/polymer/polymer.js",
          "/platform/platform.js"
        ]
      }
    }
};
banksean commented 8 years ago

I get this too.

Based on some debug statements I inserted, I think the first parameter (named "express") in plugin.js line 40 is actually the done() function, rather than the express app instance it's expecting.

I'm using wct 4.3.5.

banksean commented 8 years ago

Related: The WCT has a bug in how it calls emitHook for 'prepare:webserver'. Here's a PR that fixes it.

lukasoppermann commented 8 years ago

@banksean thanks, this does indeed fix it, hope they merge it soon, as it will otherwise not let me use it on travis.

eugef commented 7 years ago

This bug still happens for the WCT v5.0.0

hyyan commented 7 years ago

Any news about this issue ?

alvaropinot commented 7 years ago

you can try installing last WCT preview version as it was fixed at https://github.com/Polymer/web-component-tester/pull/445

if you are using a local package.json file

npm i -D web-component-tester@6.0.0-prerelease.2

or if you are using WCT globally

npm i -g web-component-tester@6.0.0-prerelease.2
eoutterson commented 7 years ago

Any news? This issue for me.

akshay-kale commented 7 years ago

try with web-component-tester@4.2.2 working for me