Skip to content

Commit 0fb5aec

Browse files
authored
Merge pull request #71 from mtsmfm/file-attr
Add file attr
2 parents 8e3205f + 8ab3d6a commit 0fb5aec

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

__tests__/__snapshots__/buildJsonResults.test.js.snap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Object {
2929
Object {
3030
"_attr": Object {
3131
"classname": "a thing should foo",
32+
"file": "path/to/project1/__tests__/test1.test.js",
3233
"name": "project1-foo",
3334
"time": 0.003,
3435
},
@@ -55,6 +56,7 @@ Object {
5556
Object {
5657
"_attr": Object {
5758
"classname": "another thing should foo",
59+
"file": "path/to/project2/__tests__/test2.test.js",
5860
"name": "project2-foo",
5961
"time": 0.001,
6062
},

utils/buildJsonResults.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ module.exports = function (report, appDirectory, options) {
119119
_attr: {
120120
classname: replaceVars(options.classNameTemplate, testVariables),
121121
name: replaceVars(options.titleTemplate, testVariables),
122-
time: tc.duration / 1000
122+
time: tc.duration / 1000,
123+
file: filepath
123124
}
124125
}]
125126
};

0 commit comments

Comments
 (0)