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

expect(5).to.be.a.string does not throw error #476

Closed
cappslock opened this issue Jun 30, 2015 · 1 comment
Closed

expect(5).to.be.a.string does not throw error #476

cappslock opened this issue Jun 30, 2015 · 1 comment

Comments

@cappslock
Copy link

So I have done this, and it does not throw an error:

expect(5).to.be.a.string;

After playing a bit and checking the docs, I realize that this is not the intended use of string in a chain, and what I actually want is this:

expect(5).to.be.a("string");

Great! But I wonder if there are invalid assertions that exist because of the first case's perceived intuitiveness when you get used to writing natural language chains. Would it be possible to detect when that case pops up and throw an error, or are there difficulties/tradeoffs which prevent that?

@keithamus
Copy link
Member

Hey @cappslock thanks for the issue.

We have some ideas in the pipeline about solving this class of problem, namely #407 and #457. I suggest subscribing to those issues if you want updates about this.

I'll close this for now, as #407 and #457 cover solving problems like these pretty perfectly.

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