Skip to content

Commit

Permalink
add example value to testname
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Sommerfeld committed Nov 17, 2022
1 parent 16e400c commit 570956b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/create-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,10 @@ function createScenario(
const pickle = findPickleById(context, exampleId);

const baseName = pickle.name || "<unamed scenario>";

const exampleName = `${baseName} (example #${i + 1})`;

const altName = scenario.examples[0].tableBody[i].cells[0].value || ""

const exampleName = (altName === "") ? `${baseName} #(example #${i + 1})` : `${baseName} #${altName}`;

createPickle(context, { ...scenario, name: exampleName }, pickle);
}
Expand Down

0 comments on commit 570956b

Please sign in to comment.