-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cypress error: cy.task('coverageReport')
failed - Cannot read properties of undefined (reading 'start')
#602
Comments
I'm having a similar issue, the problem is in the coverage output, it's invalid for some scenario. Example added below. The "s[29]" entry is {
"path": "/src/pages/index.tsx",
"statementMap": {
"0": {
"start": { "line": 31, "column": 69 },
"end": { "line": 198, "column": 1 }
},
"1": {
"start": { "line": 34, "column": 17 },
"end": { "line": 34, "column": 28 }
},
"2": {
"start": { "line": 35, "column": 16 },
"end": { "line": 35, "column": 32 }
},
"3": {
"start": { "line": 36, "column": 37 },
"end": { "line": 36, "column": 50 }
},
"4": {
"start": { "line": 37, "column": 44 },
"end": { "line": 37, "column": 59 }
},
"5": {
"start": { "line": 38, "column": 34 },
"end": { "line": 38, "column": 46 }
},
"6": {
"start": { "line": 40, "column": 30 },
"end": { "line": 45, "column": 4 }
},
"7": {
"start": { "line": 47, "column": 2 },
"end": { "line": 51, "column": 29 }
},
"8": {
"start": { "line": 48, "column": 4 },
"end": { "line": 50, "column": 5 }
},
"9": {
"start": { "line": 49, "column": 6 },
"end": { "line": 49, "column": 53 }
},
"10": {
"start": { "line": 54, "column": 32 },
"end": { "line": 54, "column": 38 }
},
"11": {
"start": { "line": 55, "column": 4 },
"end": { "line": 61, "column": 5 }
},
"12": {
"start": { "line": 56, "column": 6 },
"end": { "line": 59, "column": 9 }
},
"13": {
"start": { "line": 60, "column": 6 },
"end": { "line": 60, "column": 13 }
},
"14": {
"start": { "line": 62, "column": 4 },
"end": { "line": 75, "column": 5 }
},
"15": {
"start": { "line": 64, "column": 6 },
"end": { "line": 64, "column": 40 }
},
"16": {
"start": { "line": 65, "column": 6 },
"end": { "line": 68, "column": 9 }
},
"17": {
"start": { "line": 69, "column": 6 },
"end": { "line": 69, "column": 53 }
},
"18": {
"start": { "line": 71, "column": 6 },
"end": { "line": 74, "column": 9 }
},
"19": {
"start": { "line": 78, "column": 2 },
"end": { "line": 86, "column": 21 }
},
"20": {
"start": { "line": 79, "column": 34 },
"end": { "line": 79, "column": 46 }
},
"21": {
"start": { "line": 80, "column": 4 },
"end": { "line": 85, "column": 5 }
},
"22": {
"start": { "line": 81, "column": 6 },
"end": { "line": 84, "column": 9 }
},
"23": {
"start": { "line": 92, "column": 6 },
"end": { "line": 92, "column": 26 }
},
"24": {
"start": { "line": 94, "column": 2 },
"end": { "line": 197, "column": 4 }
},
"25": {
"start": { "line": 113, "column": 10 },
"end": { "line": 115, "column": 12 }
},
"26": {
"start": { "line": 191, "column": 10 },
"end": { "line": 191, "column": 33 }
},
"27": {
"start": { "line": 200, "column": 0 },
"end": { "line": 207, "column": 2 }
},
"28": {
"start": { "line": 201, "column": 2 },
"end": { "line": 206, "column": 4 }
}
},
"fnMap": {
"0": {
"name": "(anonymous_0)",
"decl": {
"start": { "line": 31, "column": 69 },
"end": { "line": 31, "column": 70 }
},
"loc": {
"start": { "line": 33, "column": 6 },
"end": { "line": 198, "column": 1 }
},
"line": 33
},
"1": {
"name": "(anonymous_1)",
"decl": {
"start": { "line": 47, "column": 12 },
"end": { "line": 47, "column": 13 }
},
"loc": {
"start": { "line": 47, "column": 18 },
"end": { "line": 51, "column": 3 }
},
"line": 47
},
"2": {
"name": "onSubmit",
"decl": {
"start": { "line": 53, "column": 17 },
"end": { "line": 53, "column": 25 }
},
"loc": {
"start": { "line": 53, "column": 60 },
"end": { "line": 76, "column": 3 }
},
"line": 53
},
"3": {
"name": "(anonymous_3)",
"decl": {
"start": { "line": 78, "column": 12 },
"end": { "line": 78, "column": 13 }
},
"loc": {
"start": { "line": 78, "column": 18 },
"end": { "line": 86, "column": 3 }
},
"line": 78
},
"4": {
"name": "(anonymous_4)",
"decl": {
"start": { "line": 111, "column": 17 },
"end": { "line": 111, "column": 18 }
},
"loc": {
"start": { "line": 111, "column": 23 },
"end": { "line": 116, "column": 9 }
},
"line": 111
},
"5": {
"name": "(anonymous_5)",
"decl": {
"start": { "line": 190, "column": 17 },
"end": { "line": 190, "column": 18 }
},
"loc": {
"start": { "line": 190, "column": 23 },
"end": { "line": 192, "column": 9 }
},
"line": 190
},
"6": {
"name": "(anonymous_6)",
"decl": {
"start": { "line": 200, "column": 15 },
"end": { "line": 200, "column": 16 }
},
"loc": {
"start": { "line": 200, "column": 30 },
"end": { "line": 207, "column": 1 }
},
"line": 200
}
},
"branchMap": {
"0": {
"loc": {
"start": { "line": 48, "column": 4 },
"end": { "line": 50, "column": 5 }
},
"type": "if",
"locations": [
{
"start": { "line": 48, "column": 4 },
"end": { "line": 50, "column": 5 }
},
{
"start": { "line": 48, "column": 4 },
"end": { "line": 50, "column": 5 }
}
],
"line": 48
},
"1": {
"loc": {
"start": { "line": 55, "column": 4 },
"end": { "line": 61, "column": 5 }
},
"type": "if",
"locations": [
{
"start": { "line": 55, "column": 4 },
"end": { "line": 61, "column": 5 }
},
{
"start": { "line": 55, "column": 4 },
"end": { "line": 61, "column": 5 }
}
],
"line": 55
},
"2": {
"loc": {
"start": { "line": 55, "column": 8 },
"end": { "line": 55, "column": 27 }
},
"type": "binary-expr",
"locations": [
{
"start": { "line": 55, "column": 8 },
"end": { "line": 55, "column": 14 }
},
{
"start": { "line": 55, "column": 18 },
"end": { "line": 55, "column": 27 }
}
],
"line": 55
},
"3": {
"loc": {
"start": { "line": 80, "column": 4 },
"end": { "line": 85, "column": 5 }
},
"type": "if",
"locations": [
{
"start": { "line": 80, "column": 4 },
"end": { "line": 85, "column": 5 }
},
{
"start": { "line": 80, "column": 4 },
"end": { "line": 85, "column": 5 }
}
],
"line": 80
},
"4": {
"loc": {
"start": { "line": 102, "column": 7 },
"end": { "line": 106, "column": 14 }
},
"type": "cond-expr",
"locations": [
{
"start": { "line": 103, "column": 8 },
"end": { "line": 105, "column": 16 }
},
{
"start": { "line": 106, "column": 10 },
"end": { "line": 106, "column": 14 }
}
],
"line": 102
},
"5": {
"loc": {
"start": { "line": 114, "column": 35 },
"end": { "line": 114, "column": 49 }
},
"type": "binary-expr",
"locations": [
{
"start": { "line": 114, "column": 35 },
"end": { "line": 114, "column": 43 }
},
{
"start": { "line": 114, "column": 47 },
"end": { "line": 114, "column": 49 }
}
],
"line": 114
},
"6": {
"loc": {
"start": { "line": 114, "column": 58 },
"end": { "line": 114, "column": 68 }
},
"type": "binary-expr",
"locations": [
{
"start": { "line": 114, "column": 58 },
"end": { "line": 114, "column": 62 }
},
{
"start": { "line": 114, "column": 66 },
"end": { "line": 114, "column": 68 }
}
],
"line": 114
},
"7": {
"loc": {
"start": { "line": 128, "column": 9 },
"end": { "line": 132, "column": 16 }
},
"type": "cond-expr",
"locations": [
{
"start": { "line": 129, "column": 10 },
"end": { "line": 131, "column": 18 }
},
{
"start": { "line": 132, "column": 12 },
"end": { "line": 132, "column": 16 }
}
],
"line": 128
}
},
"s": {
"0": 8,
"1": 44,
"2": 44,
"3": 44,
"4": 44,
"5": 44,
"6": 44,
"7": 44,
"8": 7,
"9": 0,
"10": 3,
"11": 3,
"12": 0,
"13": 0,
"14": 3,
"15": 3,
"16": 3,
"17": 0,
"18": 3,
"19": 44,
"20": 7,
"21": 7,
"22": 0,
"23": 44,
"24": 44,
"25": 0,
"26": 7,
"27": 8,
"28": 23,
"29": null
},
"f": { "0": 44, "1": 7, "2": 3, "3": 7, "4": 0, "5": 7, "6": 23 },
"b": {
"0": [0, 7],
"1": [0, 3],
"2": [3, 3],
"3": [0, 7],
"4": [0, 44],
"5": [0, 0],
"6": [0, 0],
"7": [6, 38]
},
"_coverageSchema": "43e27e138ebf9cfc5966b082cf9a028302ed4184",
"hash": "26bfa6610a0e31dccea4f3beff3f08eaf5aaf644"
}
] |
Hi, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Logs and screenshots
Hi,
I get the following error in cypress (this is the output from "Print to console"):
Versions
3.10.0
10.10.0
Debian testing
zsh
v18.11.0
8.19.2
window.__coverage__
object? Yes.nyc_output
folder? Is there.nyc_output/out.json
file. Is it empty? Can you paste at least part of it so we can see the keys and file paths?There is, pasting
out.json
:package.json
(nyc
object) or in other NYC config files NoDescribe the bug
When running a spec file, I get the error reported above.
Link to the repo
marekdedic/imagelightbox@36513ec
The text was updated successfully, but these errors were encountered: