thedeeno / web-component-tester-istanbul

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

error when trying to find wct libraries #7

Open pironim opened 9 years ago

pironim commented 9 years ago

I got an error when trying to use istanbul it is installed as a global dependency (I have a rails project not a nodeJS) here is Error .. trying to figure out what is wrong.

➔ wct Starting Selenium server for local browsers Selenium server running on port 50144 Web server running on port 2000 and serving from /rails/marketplacemerchportal Error: ENOENT, no such file or directory '/rails/marketplacemerchportal/components/stacky/lib/parsing.js' at Error (native) at Object.fs.openSync (fs.js:500:18) at Object.fs.readFileSync (fs.js:352:15) at instrumentAsset (/home/pironim/.nvm/versions/node/v0.12.4/lib/node_modules/web-component-tester-istanbul/lib/middleware.js:21:19) at /home/pironim/.nvm/versions/node/v0.12.4/lib/node_modules/web-component-tester-istanbul/lib/middleware.js:54:24 at Layer.handle [as handle_request] (/home/pironim/.nvm/versions/node/v0.12.4/lib/node_modules/web-component-tester/node_modules/express/lib/router/layer.js:95:5) at trim_prefix (/home/pironim/.nvm/versions/node/v0.12.4/lib/node_modules/web-component-tester/node_modules/express/lib/router/index.js:312:13) at /home/pironim/.nvm/versions/node/v0.12.4/lib/node_modules/web-component-tester/node_modules/express/lib/router/index.js:280:7 at Function.process_params (/home/pironim/.nvm/versions/node/v0.12.4/lib/node_modules/web-component-tester/node_modules/express/lib/router/index.js:330:12) at next (/home/pironim/.nvm/versions/node/v0.12.4/lib/node_modules/web-component-tester/node_modules/express/lib/router/index.js:271:10) Error: ENOENT, no such file or directory '/rails/marketplacemerchportal/components/stacky/lib/formatting.js' at Error (native) at Object.fs.openSync (fs.js:500:18) at Object.fs.readFileSync (fs.js:352:15) at instrumentAsset (/home/pironim/.nvm/versions/node/v0.12.4/lib/node_modules/web-component-tester-istanbul/lib/middleware.js:21:19) at /home/pironim/.nvm/versions/node/v0.12.4/lib/node_modules/web-component-tester-istanbul/lib/middleware.js:54:24 at Layer.handle [as handle_request] (/home/pironim/.nvm/versions/node/v0.12.4/lib/node_modules/web-component-tester/node_modules/express/lib/router/layer.js:95:5) at trim_prefix (/home/pironim/.nvm/versions/node/v0.12.4/lib/node_modules/web-component-tester/node_modules/express/lib/router/index.js:312:13) at /home/pironim/.nvm/versions/node/v0.12.4/lib/node_modules/web-component-tester/node_modules/express/lib/router/index.js:280:7 at Function.process_params (/home/pironim/.nvm/versions/node/v0.12.4/lib/node_modules/web-component-tester/node_modules/express/lib/router/index.js:330:12) at next (/home/pironim/.nvm/versions/node/v0.12.4/lib/node_modules/web-component-tester/node_modules/express/lib/router/index.js:271:10) Error: ENOENT, no such file or directory '/rails/marketplacemerchportal/components/stacky/lib/normalization.js' at Error (native)

Here is my config: module.exports = { suites: ['app/assets/components/**/test'], plugins: { "web-component-tester-istanbul": { dir: "./tmp/wct-coverage", reporters: ["text-summary", "lcov"], include: [ "**/*.js" ], exclude: [ "../polymer/polymer.js", ] }, local: { // browsers: ['chrome'] // browsers: ['firefox'] // browsers: ['safari'] } }, webserver: { pathMappings: [ {'/components/<basename>/app/assets/components': 'vendor/assets/components'} ] } };

pironim commented 9 years ago

looks like istanbul dont know about wct folder and dont have access to related js

pironim commented 9 years ago

I find this line cause error: include: [ "*/.js" ], after I remove it tests started but get another error Missing error handler onsocket. TypeError: Object.keys called on non-object

thedeeno commented 9 years ago

It's possible the new bits I just pulled in fix this for you. WCT made breaking changes to the API that broke this plugin. @ctreatma has made a pass at bringing this plugin up-to-date with the latest conventions.

thedeeno commented 9 years ago

@pironim does the latest work for you now?

pironim commented 9 years ago

@thedeeno Sorry. I don't have time to try it at the moment.

thedeeno commented 9 years ago

No worries. We're all strapped. Just know that apparently the breaking changes WCT made are merged for other users now.