diff --git a/__tests__/__snapshots__/buildJsonResults.test.js.snap b/__tests__/__snapshots__/buildJsonResults.test.js.snap index 5e8a628..c41acc3 100644 --- a/__tests__/__snapshots__/buildJsonResults.test.js.snap +++ b/__tests__/__snapshots__/buildJsonResults.test.js.snap @@ -29,6 +29,7 @@ Object { Object { "_attr": Object { "classname": "a thing should foo", + "file": "path/to/project1/__tests__/test1.test.js", "name": "project1-foo", "time": 0.003, }, @@ -55,6 +56,7 @@ Object { Object { "_attr": Object { "classname": "another thing should foo", + "file": "path/to/project2/__tests__/test2.test.js", "name": "project2-foo", "time": 0.001, }, diff --git a/utils/buildJsonResults.js b/utils/buildJsonResults.js index b88506f..1511d59 100644 --- a/utils/buildJsonResults.js +++ b/utils/buildJsonResults.js @@ -119,7 +119,8 @@ module.exports = function (report, appDirectory, options) { _attr: { classname: replaceVars(options.classNameTemplate, testVariables), name: replaceVars(options.titleTemplate, testVariables), - time: tc.duration / 1000 + time: tc.duration / 1000, + file: filepath } }] };