title: CucumberJS 2.0.0 How to get the Scenario Name from the Before Scenario Hook
body: <p><strong>The Problem</strong></p>
  
  <p>I have been using the output from the Before hook to name my screenshot files so that we have the name of the Feature and Scenario that the screenshot came from.</p>
  
  <p>The output that I was getting in 1.3.0 allowed me to do a <code>scenario.getName()</code> to do this, however, the formatting from 1.3.0 has changed in 2.0.0</p>
  
  <p>Has anyone figured out how to do this?</p>
  
  <p><strong>The Code</strong></p>
  
  <pre><code>// hooks.js
  defineSupportCode(function ({registerHandler, Before}) {
  
    Before(function (scenario, callback) {
          global.scenarioDetails = function(){
             return scenario;
          }
          callback();
    });
  
  });
  
  
  //otherFile.js
  let name = scenarioDetails().&lt;somethingHereToGrabTheName&gt;;
  </code></pre>
  
  <p><strong>Output from <code>console.log()</code></strong></p>
  
  <pre><code>ScenarioResult {
   duration: 8043,
    failureException: null,
    scenario:
     Scenario {
       feature:
        Feature {
          description: undefined,
          keyword: 'Feature',
          line: 2,
          name: 'Hello World',
          tags: [Object],
          uri: 'Path/to/my.feature',
          scenarios: [Object] },
       keyword: 'Scenario',
       lines: [ 3 ],
       name: 'Google Search',
       tags: [ [Object] ],
       uri: 'Path/to/my.feature',
       line: 3,
       description: undefined,
       steps: [ [Object], [Object], [Object] ] },
    status: 'passed',
    stepResults:
     [ StepResult {
         attachments: [],
         duration: 1,
         step: [Object],
         stepDefinition: [Object],
         status: 'passed' },
       StepResult {
         attachments: [],
         duration: 8042,
         step: [Object],
         stepDefinition: [Object],
         status: 'passed' } ] }
  </code></pre>