import { IFeature } from './cucumber-generic/JSONSchema' ; import { traverseFeature as traverseJSFeature } from './cucumber-js/JSONTraverse' ; import { traverseFeature as traverseRubyFeature } from './cucumber-ruby/JSONTraverse' ; import { IFeature as IBehaveFeature } from './behave/JSONSchema' ; import { traverseFeature as traverseBehaveFeature } from './behave/JSONTraverse' ; import IPredictableSupportCode from './IPredictableSupportCode' ; import IAstMaker from './IAstMaker' ; import * as messages from '@cucumber/messages' ; import { Implementation } from './types' ; export default function traverseFeature ( implementation , feature , astMaker , newId , predictableSupportCode ) { if ( implementation === 'cucumber-js' ) { return traverseJS ( feature as IFeature , astMaker , newId , predictableSupportCode ) ; } if ( implementation === 'behave' ) { return traverseBehave ( feature as IBehaveFeature , astMaker , newId , predictableSupportCode ) ; } return traverseRuby ( feature as IFeature , astMaker , newId , predictableSupportCode ) ; } function traverseJS ( feature , astMaker , newId , predictableSupportCode ) { return traverseJSFeature ( feature , astMaker , newId , predictableSupportCode ) ; } function traverseRuby ( feature , astMaker , newId , predictableSupportCode ) { return traverseRubyFeature ( feature , astMaker , newId , predictableSupportCode ) ; } function traverseBehave ( feature , astMaker , newId , predictableSupportCode ) { return traverseBehaveFeature ( feature , astMaker , newId , predictableSupportCode ) ; }