Skip to content

Path must be a string. Received undefined in addFileCoverage method #167

@meowtec

Description

@meowtec

origFileName = rawSourceMap.file;
fileName = filePath.replace(path.extname(origFileName), path.extname(origSourceFilename));

rawSourceMap.file is undefined in coverage:

{
  "/path/to/app.vue": {
    "_coverageSchema": "332fd63041d2c1bcb487cc26dd0d5f7d97098a6c",
    "b": {},
    "branchMap": {},
    "f": {},
    "fnMap": {},
    "hash": "45eccc5edb832ac9107a13add75c37148a2a42ab",
    "inputSourceMap": {
      "mappings": ";;;;;AAKA;AACA",
      "names": [],
      "sourceRoot": "vuex",
      "sources": [
        "app.vue"
      ],
      "sourcesContent": [
        "<template>\n  <div></div>\n</template>\n<script>\n\nexport default {\n}\n</script>\n"
      ],
      "version": 3
    },
    "path": "/Users/berton/workspace/awesome-practice-projects/vuex/app.vue",
    "s": {},
    "statementMap": {},
    "l": {}
  }
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions