Skip to content

Commit

Permalink
Fix fullName use case
Browse files Browse the repository at this point in the history
Fix for some concerns raised in #2
  • Loading branch information
Vanuan authored Oct 6, 2017
1 parent 21850da commit c3990d7
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,15 @@ class UniqueTestNames {
.filter((t) => t.status !== 'pending')
.map((t) => {

const testStruct = {
title: t.title,
filename: relativeTestFilePath
};

let key = '';
if (this._options.global) {
if (this._options.useFullName) {
// Unique describe->test across all files
key = t.fullName;
} else {
// Unique test names across all files
key = t.title;
}

// Unique test names across all files
key = t.title;
} else {
if (this._options.useFullName) {
// Unique describe->test per file
Expand All @@ -73,6 +68,10 @@ class UniqueTestNames {
// Unique test name across per file
key = `${relativeTestFilePath}-${t.title}`;
}
const testStruct = {
title: key,
filename: relativeTestFilePath
};

return Object.assign(
{},
Expand Down

0 comments on commit c3990d7

Please sign in to comment.