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

Added notContainSubset option to assert #71

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Added notContainSubset option to assert #71

wants to merge 2 commits into from

Conversation

diego3g
Copy link

@diego3g diego3g commented Jul 18, 2018

Chai assert style generally includes an not version for every type of assertion (http://www.chaijs.com/api/assert/#method_notequal).

This PR includes the notContainSubset option to assert style.

Also runned prettier inside tests to respect ESLint rules.

@diego3g diego3g changed the title Added toNotContain option to assert Added notContainSubset option to assert Jul 18, 2018
@diego3g
Copy link
Author

diego3g commented Aug 17, 2018

Any updated on this?

@eagleeye
Copy link
Contributor

@diego3g you can just use chain method not e.g. to.not.containSubset()

@diego3g
Copy link
Author

diego3g commented Aug 20, 2018

AdonisJS uses chai-subset without to and not so it can integrates with other assertion types from Adonis.

I can only use it like this:

assert.containSubset(obj, { find: true });

And can't use like this:

expect(obj).to.containSubset({ find: true })

So when i use:

assert.not.containSubset(...)

It returns:

TypeError: Cannot read property 'containSubset' of undefined

Do you think it's better to change something in Adonis? Actually i don't think it will bring downsides to chai-subset at all.

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

Successfully merging this pull request may close these issues.

2 participants