eddyerburgh / avoriaz-ava-example

Testing Vue components with AVA and avoriaz example
MIT License
16 stars 3 forks source link

Inclusion of code coverage - NYC #8

Closed piyushchauhan2011 closed 7 years ago

piyushchauhan2011 commented 7 years ago

I was wondering is it possible to add in the code coverage using nyc, it would be very helpful @eddyerburgh

piyushchauhan2011 commented 7 years ago
{
  "name": "avoriaz-ava-example",
  "version": "1.0.0",
  "description": "example project using avoriaz with ava-webpack to test Vue.js components",
  "main": ".eslintrc.js",
  "scripts": {
    "lint:fix": "eslint src test --ext .js,.vue -- --fix",
    "test": "nyc ava test/*.spec.js",
    "report": "./node_modules/.bin/nyc report --reporter=html",
    "codecov": "./node_modules/.bin/nyc report --reporter=lcov > coverage.lcov && codecov"
  },
  "nyc": {
    "exclude": [
      "node_modules"
    ],
    "extension": [
      ".js",
      ".vue"
    ]
  },
  "ava": {
    "require": [
      "./test/.setup.js"
    ]
  },
  "author": "Edd Yerburgh",
  "license": "MIT",
  "devDependencies": {
    "ava": "^0.19.1",
    "avoriaz": "^1.11.1",
    "babel-core": "^6.21.0",
    "babel-eslint": "^7.1.1",
    "babel-loader": "^6.2.10",
    "babel-preset-es2015": "^6.18.0",
    "babel-preset-stage-2": "^6.18.0",
    "browser-env": "^2.0.30",
    "codecov": "^2.2.0",
    "css-loader": "^0.26.1",
    "eslint": "^3.13.1",
    "eslint-config-airbnb": "^14.0.0",
    "eslint-plugin-html": "^1.7.0",
    "eslint-plugin-import": "^2.2.0",
    "eslint-plugin-jsx-a11y": "^3.0.2",
    "eslint-plugin-react": "^6.9.0",
    "nyc": "^11.0.2",
    "require-extension-hooks": "^0.2.0",
    "require-extension-hooks-babel": "^0.1.1",
    "require-extension-hooks-vue": "^0.3.1",
    "vue-loader": "^11.3.4",
    "vue-template-compiler": "^2.2.6",
    "webpack": "^2.4.1"
  },
  "dependencies": {
    "vue": "^2.2.6"
  }
}

Finally got it working ;)

eddyerburgh commented 7 years ago

Nice! 😄

Could you make a PR and add nyc to the example?

piyushchauhan2011 commented 7 years ago

Awesome @eddyerburgh 😃 Opened a pull for inclusion 💯

piyushchauhan2011 commented 7 years ago

Hi @eddyerburgh I was wondering if you give a try to Nuxt.js and if it's possible to include avoriaz+nyc+ava coverage there also ?

eddyerburgh commented 7 years ago

@piyushchauhan2011 I'm busy for the next week, but I could have a look after 👍

Not sure why using ava and avoriaz would cause the server to run infinitely?

piyushchauhan2011 commented 7 years ago

Hey @eddyerburgh, all good 💯 No worries. Yeah, I don't know for some reason it just hangs up, I might make a mock repo so that others can test it out too.