Skip to content

1.4.5

Compare
Choose a tag to compare
@yashaka yashaka released this 29 Jun 19:41
· 7 commits to master since this release

Flatten inner lists inside have.texts(HERE)

Now you can pass nested arrays to have.texts:

// Like:
await table.all('tr').all('td').should(
    have.texts(
        ['Bach', 'Frank', '[email protected]'],
        ['Conway', 'Tim', '[email protected]'],
    )
)

// Instead of:
await table.all('tr').all('td').should(
    have.texts(
        'Bach', 'Frank', '[email protected]',
        'Conway', 'Tim', '[email protected]',
    )
)

You might need this if you use formatter like prettier, that will format your code more like:

await table.all('tr').all('td').should(
    have.texts(
        'Bach',
        'Frank',
        '[email protected]',
        'Conway', 
        'Tim', 
        '[email protected]',
    )
)

– that is pretty not readable in context of table data...