You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 28, 2019. It is now read-only.
Hi. The issue happens when a feature file starts with an "invisible" UTF-8 BOM (http://en.wikipedia.org/wiki/Byte_order_mark). As a BOM cannot be seen in most text editors, it makes it very difficult to diagnose. Basically only people who know what a BOM is will be able to fix the issue. I saw this issue when upgrading cucumber-js to 0.4.x. All of a sudden, a number of feature files that were previously passing, suddenly started to throw the cryptic error below.
Here's the error the issue causes:
...\node_modules\gherkin\lib\gherkin\lexer\en.js:1008
throw new Error("Lexing error on line " + this.line_number + ": '" + content + "'. See http://wiki.github.com/cucumber/gherkin/lexingerror for more information.");
^
Error: Lexing error on line 1: 'Feature: Example feature'. See
http://wiki.github.com/cucumber/gherkin/lexingerror for more information.
at Lexer.scan
(...\node_modules\gherkin\lib\gherkin\lexer\en.js:1008:13)
at Object.parse
(...\node_modules\cucumber\lib\cucumber\parser.js:26:25)
at Object.getFeatures
(...\node_modules\cucumber\lib\cucumber\runtime.js:24:35)
at Object.start
(...\node_modules\cucumber\lib\cucumber\runtime.js:10:37)
at Object.self._task
Only one spec is failing with the js parser, and it's commented out here:
https://github.com/aslakhellesoy/gherkin/blob/master/spec/gherkin/js_lexer_spec.rb#L19
This means many files saved with a Windows editor will not parse, and this needs to be fixed. I haven't looked into the cause of the problem.
The text was updated successfully, but these errors were encountered: