vue-test-utils-jest-example icon indicating copy to clipboard operation
vue-test-utils-jest-example copied to clipboard

Lines in coverage report are incorrect

Open fritx opened this issue 6 years ago • 4 comments

// List.spec.js
describe('List.vue', () => {
  it('renders li for each item in props.items', () => {
    // const items = ['', '']
    // const wrapper = shallow(List, {
    //   propsData: { items }
    // })
    // expect(wrapper.findAll('li')).toHaveLength(items.length)
  })
})

fritx avatar Sep 19 '17 12:09 fritx

Try adding "mapCoverage": true to the jest field in package.json. Like this - https://github.com/eddyerburgh/jest-vue/blob/master/package.json#L73

eddyerburgh avatar Sep 19 '17 13:09 eddyerburgh

Seems it's ok in this repo, but not in my own library repo :/ Let me try again later.

fritx avatar Sep 20 '17 04:09 fritx

I met some bugs when doing coverage with jest in vue, now I switched back to karma/mocha/phantomjs.

Waiting for more progress on vue-test-utils.

fritx avatar Sep 20 '17 14:09 fritx

Can you report bugs to https://github.com/eddyerburgh/jest-vue?

eddyerburgh avatar Sep 20 '17 14:09 eddyerburgh