Antonella's avatar

Cypress split string for test laravel 8x

i need to parse a string in cypress.

type i have this string:

text2 = "change status id 423 in Cult"
text1 = 423
// unfortunately this method doesn't let me use it and gives an error
var id = text2.split (' ')
expect (text1).to.eq(id[3])

how can i do such a thing in cypress

0 likes
0 replies

Please or to participate in this conversation.