I am developing an API automated test case using cucumber and JavaScript and I am getting this error:
Error: Parse error in 'test/step_definitions/requester.js': (1:1): expected: #EOF, #Language, #TagLine, #FeatureLine, #Comment, #Empty, got '//const fetch = require('node-fetch');'
I have a .feature file within 'features' folder. In addition, I have two .js files within 'step_definitions' folder. Files are 'my_steps' and 'requester.js'.
The Gruntfile.js contains this line to run it:
command: './node_modules/.bin/cucumber-js /features/*.feature -r /Users/alfredo.bazo/XCore-ContentLibrary-Tests/API-Test/test/step_definitions/*.js',
As per error thrown, it seems that requester.js file is considered as a feature file. Why? How can I fix it?
Thanks in advance.