breezy-australia-64868
11/17/2020, 2:17 AMstocky-dream-36427
11/17/2020, 2:17 AMbreezy-australia-64868
11/17/2020, 2:18 AMstocky-dream-36427
11/20/2020, 8:48 PMstocky-dream-36427
11/20/2020, 8:54 PMstocky-dream-36427
11/20/2020, 8:55 PMancient-appointment-66951
11/20/2020, 11:53 PMancient-appointment-66951
11/20/2020, 11:54 PMancient-appointment-66951
11/20/2020, 11:54 PMancient-appointment-66951
11/20/2020, 11:56 PMbreezy-australia-64868
12/06/2020, 9:45 PM<template>
tags? After some googling, it seems like it might be a Vue limitation at the moment. When I analyze my coverage report I'm not getting any coverage on logic that's coming from v-if
directives for example, and my coverage is saying I have 100% coverage when really there's a fair amount of logic that's not being tested. Would love if anyone has any insight into this!stocky-dream-36427
12/08/2020, 5:56 PMbreezy-australia-64868
12/08/2020, 5:56 PMstocky-dream-36427
12/08/2020, 5:57 PMstocky-dream-36427
12/08/2020, 5:58 PMstocky-dream-36427
12/08/2020, 6:21 PMstocky-dream-36427
12/08/2020, 6:22 PMstocky-dream-36427
12/08/2020, 6:22 PMstocky-dream-36427
12/08/2020, 6:23 PMbreezy-australia-64868
12/08/2020, 6:41 PMflaky-dress-57428
12/08/2020, 6:46 PM<script>
they won't be picked up at all.breezy-australia-64868
12/08/2020, 6:48 PMancient-appointment-66951
12/08/2020, 7:11 PM<template>
in both jest and/or cypress.
that said I am not sure how much sense this really makes? the way code coverage usually works is tracking which line(s) are/are not executed - in the case of a <template>
, as long as the component is rendered, the entire thing is "executed". what kind of reporting/metrics do you have in mind for coverage in <template>
@User?
the only thing I can think of is some way to indicate the content of a conditional <div v-if>
is never rendered or something, but I am not sure how useful that would be 🤔breezy-australia-64868
12/08/2020, 7:15 PMv-if
to render one of two buttons. I write my tests to cover everything in my component but I forget to write one that makes sure the correct button is rendered. Shouldn't that be reflected in my code coverage?ancient-appointment-66951
12/08/2020, 7:20 PM<template>
code is executed, I have no idea how difficult this would be.ancient-appointment-66951
12/08/2020, 7:21 PMancient-appointment-66951
12/08/2020, 7:22 PM<template>
does this "just work" out of the box 🤔 it should (although not really relevant to your problem, i'd be interested to know if it does, good place to start to investigate implementing this)breezy-australia-64868
12/08/2020, 7:29 PMancient-wire-34126
12/09/2020, 1:29 PMv-if
should be a computed value or a method, ideally, which you can test.
But I agree that it might be good to maybe get a warning if an inline check is done and if that's a branch that hasn't been covered