expect(invoice.getText()).toMatch('This is\s+my URL');
invoice.getText().then(function (text) { expect(text.replace(/\n/, '')).toBe('This is my URL'); })
it('Description' async function(){ //your code expect(await invoice.getText()).toBe('This is\n'+ 'my URL'); })