We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added a custom assertion and it runs fine in Chrome but fails in PhantomJS.
Expected at least one assertion, but none were run - call expect(0) to accept zero assertions
My custom assertion is pretty long where attempting to do a pushResult on a bunch of expected behavior that originally was multiple assertions.
pushResult
export default function userMessage(context, message, messageText = '', numMessages = 1, type = 'error') { const userMessageEl = context.$('[data-test-userMessages]'); if (!userMessageEl) { return this.pushResult({ result: false, actual: 0, expected: numMessages, message: `${message} - User Message Did Not Appear` }); } const actualNumMessages = userMessageEl.length; if (actualNumMessages !== numMessages) { return this.pushResult({ result: false, actual: actualNumMessages, expected: numMessages, message: `${message} - Unexpected User Messages` }); } const actualMessage = context.$('[data-test-userMessageDetail').text().trim(); if (messageText && (messageText !== actualMessage)) { return this.pushResult({ result: false, actual: actualMessage, expected: messageText, message: `${message} - Incorrect Message Text` }); } const expectedTypeClass = `user-messages__message--${type}`; if (!userMessageEl.hasClass(expectedTypeClass)) { const actualClasses = userMessageEl.attr('class'); return this.pushResult({ result: false, actual: actualClasses, expected: expectedTypeClass, message: `${message} - Incorrect Type Class` }); } const expected = `${numMessages} - ${messageText}`; const actual = expected; return this.pushResult({ result: true, actual, expected, message }); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Added a custom assertion and it runs fine in Chrome but fails in PhantomJS.
Expected at least one assertion, but none were run - call expect(0) to accept zero assertions
My custom assertion is pretty long where attempting to do a
pushResult
on a bunch of expected behavior that originally was multiple assertions.The text was updated successfully, but these errors were encountered: