The function should also support concatenation. Looking at the AST Explorer, I think that the function should run recursively and recheck its left and its right to ensure that they are either a Binary Expression or a String Literal, or an Identifier.
Currently, doing:
Would fail, saying that the assertion message is not a string. This is happening over here:
https://github.com/avajs/eslint-plugin-ava/blob/dee1802d39e22aec0915d5067062356f5abfbd84/rules/assertion-arguments.js#L206
The function should also support concatenation. Looking at the AST Explorer, I think that the function should run recursively and recheck its
left
and itsright
to ensure that they are either aBinary Expression
or aString Literal
, or anIdentifier
.