How do you merge multiple Cypress.Chainable
?
#21232
Unanswered
matthew-a-thomas
asked this question in
Questions and Help
Replies: 2 comments 5 replies
-
Turns out that while it's not pretty, it's not difficult to just deeply nest the chains: cy.fixture('en_US.aff').then(aff =>
cy.fixture('en_US.dic').then(dic =>
cy.fixture('dictionary.dic').then(personal => {
const nSpell = NSpell({ aff: aff, dic: dic }).personal(personal);
cy.get('body').then(body => {
const text = body.text();
// assert correct spelling here...
});
})
)
); This can be encapsulated as a function for reuse. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I need to instantiate an nspell object so that I can check the spelling of my app's pages. To do so I have to load three files from disk (an en-us .dic file, an en-us .aff file, and a personal .dic file). I know I can make individual chains for reading the individual files like this:
But how do I make a chain that spits out an
nspell
instance once all three have completed?Beta Was this translation helpful? Give feedback.
All reactions