Skip to content

Commit

Permalink
Merge pull request #3 from Vanuan/patch-1
Browse files Browse the repository at this point in the history
Fix fullName use case
  • Loading branch information
palmerj3 authored Oct 6, 2017
2 parents 21850da + b3758aa commit 028d4e6
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,29 +50,28 @@ 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
key = `${relativeTestFilePath}-${t.fullName}`;
} else {
// Unique test name across per file
key = `${relativeTestFilePath}-${t.title}`;
}

// 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 028d4e6

Please sign in to comment.