Skip to content
New issue

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

Any interest in plain text assertion? #82

Open
callmepills opened this issue Jan 28, 2017 · 1 comment
Open

Any interest in plain text assertion? #82

callmepills opened this issue Jan 28, 2017 · 1 comment

Comments

@callmepills
Copy link
Contributor

@dareid Do you see any value in adding a plainText() assertion? It would behave similar to the existing json() assertion. For example:

expect(response).to.have.plainText("chakram is awesome");
expect(response).to.comprise.of.plainText("chakram is awesome");

Figured I would post here before submitting a PR. Let me know what you think.

@dareid
Copy link
Owner

dareid commented Feb 10, 2017

Hi @codepills,

I originally kept chakram to JSON, mainly to limit the amount of work involved in getting everything working. I am happy for plain text assertions to be added.

One thing with the proposed assertions, at the moment Chakram does not support chained assertions, like comprise.of.plainText. When chains are used the promise checking in chakram.wait does not work. I will have to knock together an example at some point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants