question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make the assertions chainable

See original GitHub issue

What do you think about making it possible to chain assertions? That way you don’t have to call assert.dom() multiple times (or cache it).

assert.dom('.some-class')
  .exists()
  .hasText('Testing')
  .hasAttribute('disabled');

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
Turbo87commented, Nov 1, 2018

I’m trying to remember. I think there was a reason that prevented it, but I don’t recall what it was… 🤔

0reactions
deyshincommented, Dec 13, 2019

I came here while researching if this is allowed. Have we found a strong reason to block this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Make the assertions chainable · Issue #177 - GitHub
What do you think about making it possible to chain assertions? That way you don't have to call assert.dom() multiple times (or cache...
Read more >
Chained assertions - A crust of code
TL;DR: Chain assertions for scannability. Here's some code to help ... If that's true, it's useful to arrange tests to make scanning easier....
Read more >
Building a Helper - Chai Assertion Library
Providing chainable helper assertions is the most common use of the plugin utilities that Chai exposes. Before we get into the basics, we...
Read more >
Grouping Assertions With and or with - Strikt
Strikt provides the and and with functions, and several varieties of with* , that are used to add a block of assertions to...
Read more >
Assertions | Cypress Documentation
They don't actually do anything, but they enable you to write clear, english sentences. Chainable getters. to , be , been , is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found