Skip to content

Allow concatenation when ensuring assertion message is a string #332

Open
@Yash-Singh1

Description

@Yash-Singh1

Currently, doing:

t.notThrowsAsync(asyncNotThrowingFn, 'abc' + someString)

Would fail, saying that the assertion message is not a string. This is happening over here:

function isString(node) {

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions