Skip to content

Commit

Permalink
Remove duplicate test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
adams85 committed May 17, 2024
1 parent f7ecb88 commit ee2ded5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions test/Acornima.Tests/ParserTests.ReservedWords.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,13 @@ private static IEnumerable<string> GetAllReservedWords()
public static IEnumerable<object[]> IsKeywordMatchesAcornImplData =>
from word in GetAllReservedWords()
from ecmaVersion in new[] { EcmaVersion.ES3, EcmaVersion.ES5, EcmaVersion.ES6, EcmaVersion.Latest }
from isModule in new[] { false, true }
select new object[]
{
word,
ecmaVersion,
ecmaVersion < EcmaVersion.ES6 && word is "export" or "import" // in these cases we deliberately deviate from the original acornjs implementation
? false
: AcornUtils.WordsRegexp(AcornIdentifier.Keywords[ecmaVersion >= EcmaVersion.ES6 ? "6" : isModule ? "5module" : "5"]).IsMatch(word)
: AcornUtils.WordsRegexp(AcornIdentifier.Keywords[ecmaVersion >= EcmaVersion.ES6 ? "6" : "5"]).IsMatch(word)
};

[Theory]
Expand Down

0 comments on commit ee2ded5

Please sign in to comment.